diff options
author | Akshay <[email protected]> | 2024-07-23 16:03:05 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2024-07-23 16:03:05 +0100 |
commit | 3099f8b97a5be7b35b2eb03506adf1167270878e (patch) | |
tree | 04676fd7ce30549c48e9787de0d9d9478dbaf569 /hosts/olive | |
parent | 1ebd3b990bdfb462a98a1432ffae7f4e739eeb44 (diff) |
stuff
Diffstat (limited to 'hosts/olive')
-rw-r--r-- | hosts/olive/configuration.nix | 147 | ||||
-rw-r--r-- | hosts/olive/hardware-configuration.nix | 36 | ||||
-rw-r--r-- | hosts/olive/qmk.rules | 74 |
3 files changed, 0 insertions, 257 deletions
diff --git a/hosts/olive/configuration.nix b/hosts/olive/configuration.nix deleted file mode 100644 index 3d5d47f..0000000 --- a/hosts/olive/configuration.nix +++ /dev/null | |||
@@ -1,147 +0,0 @@ | |||
1 | { config, pkgs, lib, self, ... }: | ||
2 | |||
3 | { | ||
4 | imports = | ||
5 | [ | ||
6 | ./hardware-configuration.nix | ||
7 | ../../services/suspend.nix | ||
8 | ]; | ||
9 | |||
10 | boot.loader.systemd-boot.enable = true; | ||
11 | boot.loader.efi.canTouchEfiVariables = true; | ||
12 | boot.kernel.sysctl."net.ipv4.ip_forward" = 1; | ||
13 | |||
14 | networking = { | ||
15 | hostName = "olive"; | ||
16 | wireless = { | ||
17 | iwd.enable = true; | ||
18 | interfaces = [ "wlan0" ]; | ||
19 | environmentFile = "/home/np/.wireless.env"; | ||
20 | networks = { | ||
21 | Sanic.psk = "@PSK_SANI@"; | ||
22 | Gopalan.psk = "@PSK_GOPA@"; | ||
23 | Srividhya.psk = "@PSK_SRIV@"; | ||
24 | sage.psk = "@PSK_SAGE@"; | ||
25 | }; | ||
26 | extraConfig = '' | ||
27 | ctrl_interface=/run/wpa_supplicant | ||
28 | ctrl_interface_group=wheel | ||
29 | ''; | ||
30 | }; | ||
31 | useDHCP = false; | ||
32 | interfaces.wlan0.useDHCP = true; | ||
33 | }; | ||
34 | |||
35 | networking.nameservers = [ "1.1.1.1" "1.0.0.1" ]; | ||
36 | |||
37 | i18n.defaultLocale = "en_US.UTF-8"; | ||
38 | time.timeZone = "Asia/Kolkata"; | ||
39 | |||
40 | nixpkgs.config = { | ||
41 | "2bwm".patches = [ | ||
42 | ../../patches/2bwm/nerd-patch.diff | ||
43 | ]; | ||
44 | |||
45 | st = { | ||
46 | conf = builtins.readFile ../../programs/st/config.h; | ||
47 | extraLibs = with pkgs; [ harfbuzz ]; | ||
48 | patches = [ | ||
49 | ../../patches/st/xres.diff | ||
50 | ../../patches/st/bright.diff | ||
51 | ../../patches/st/ligatures.diff | ||
52 | ]; | ||
53 | }; | ||
54 | |||
55 | # for zoom-us | ||
56 | allowUnfree = true; | ||
57 | }; | ||
58 | |||
59 | nixpkgs.overlays = with self.overlays; [ | ||
60 | statix | ||
61 | prompt | ||
62 | ]; | ||
63 | |||
64 | environment.systemPackages = with pkgs; [ | ||
65 | _2bwm | ||
66 | man-pages | ||
67 | man-pages-posix | ||
68 | (lib.hiPrio pkgs.bashInteractive_5) | ||
69 | ]; | ||
70 | |||
71 | documentation = { | ||
72 | dev.enable = true; | ||
73 | man.generateCaches = true; | ||
74 | }; | ||
75 | |||
76 | users.motd = with config; '' | ||
77 | Host ${networking.hostName} | ||
78 | OS NixOS ${system.nixos.release} (${system.nixos.codeName}) | ||
79 | Version ${system.nixos.version} | ||
80 | Kernel ${boot.kernelPackages.kernel.version} | ||
81 | ''; | ||
82 | |||
83 | programs = { | ||
84 | light.enable = true; | ||
85 | adb.enable = true; | ||
86 | }; | ||
87 | |||
88 | sound.enable = true; | ||
89 | |||
90 | hardware = { | ||
91 | pulseaudio = { | ||
92 | enable = true; | ||
93 | package = pkgs.pulseaudioFull; | ||
94 | extraConfig = "load-module module-bluetooth-policy auto_switch=2"; | ||
95 | }; | ||
96 | bluetooth = { | ||
97 | enable = true; | ||
98 | powerOnBoot = true; | ||
99 | }; | ||
100 | }; | ||
101 | |||
102 | # Enable the X11 windowing system. | ||
103 | services.xserver = { | ||
104 | enable = true; | ||
105 | layout = "us"; | ||
106 | displayManager.startx.enable = true; | ||
107 | libinput.enable = true; | ||
108 | }; | ||
109 | |||
110 | services.batteryNotifier = { | ||
111 | enable = true; | ||
112 | notifyCapacity = 20; | ||
113 | suspendCapacity = 10; | ||
114 | }; | ||
115 | |||
116 | services.udev.extraRules = builtins.readFile ./qmk.rules; | ||
117 | |||
118 | users.users.np = { | ||
119 | isNormalUser = true; | ||
120 | home = "/home/np"; | ||
121 | extraGroups = [ "wheel" "users" "tty" "audio" "video" "input" "adbusers" "docker" ]; | ||
122 | }; | ||
123 | |||
124 | nix = { | ||
125 | package = pkgs.nixUnstable; | ||
126 | extraOptions = '' | ||
127 | experimental-features = nix-command flakes | ||
128 | warn-dirty = false | ||
129 | keep-outputs = false | ||
130 | keep-derivations = false | ||
131 | ''; | ||
132 | settings = { | ||
133 | trusted-users = [ | ||
134 | "root" | ||
135 | "np" | ||
136 | ]; | ||
137 | }; | ||
138 | }; | ||
139 | |||
140 | # This value determines the NixOS release from which the default | ||
141 | # settings for stateful data, like file locations and database versions | ||
142 | # on your system were taken. It‘s perfectly fine and recommended to leave | ||
143 | # this value at the release version of the first install of this system. | ||
144 | # Before changing this value read the documentation for this option | ||
145 | # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||
146 | system.stateVersion = "20.03"; # Did you read the comment? | ||
147 | } | ||
diff --git a/hosts/olive/hardware-configuration.nix b/hosts/olive/hardware-configuration.nix deleted file mode 100644 index c2bff39..0000000 --- a/hosts/olive/hardware-configuration.nix +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | # Do not modify this file! It was generated by ‘nixos-generate-config’ | ||
2 | # and may be overwritten by future invocations. Please make changes | ||
3 | # to /etc/nixos/configuration.nix instead. | ||
4 | { config, lib, pkgs, modulesPath, ... }: | ||
5 | |||
6 | { | ||
7 | imports = [ | ||
8 | "${modulesPath}/installer/scan/not-detected.nix" | ||
9 | ]; | ||
10 | |||
11 | boot.initrd.availableKernelModules = [ | ||
12 | "xhci_pci" | ||
13 | "ahci" | ||
14 | "nvme" | ||
15 | "usb_storage" | ||
16 | "sd_mod" | ||
17 | ]; | ||
18 | boot.initrd.kernelModules = [ ]; | ||
19 | boot.kernelModules = [ "kvm-intel" ]; | ||
20 | boot.extraModulePackages = [ ]; | ||
21 | |||
22 | fileSystems."/" = { | ||
23 | device = "/dev/disk/by-uuid/27a7c854-e674-411f-9d79-37084922c91d"; | ||
24 | fsType = "ext4"; | ||
25 | }; | ||
26 | |||
27 | fileSystems."/boot" = { | ||
28 | device = "/dev/disk/by-uuid/882C-54D5"; | ||
29 | fsType = "vfat"; | ||
30 | }; | ||
31 | |||
32 | swapDevices = [ ]; | ||
33 | |||
34 | nix.settings.max-jobs = lib.mkDefault 8; | ||
35 | powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; | ||
36 | } | ||
diff --git a/hosts/olive/qmk.rules b/hosts/olive/qmk.rules deleted file mode 100644 index 57806f9..0000000 --- a/hosts/olive/qmk.rules +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | # Atmel DFU | ||
2 | ### ATmega16U2 | ||
3 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess" | ||
4 | ### ATmega32U2 | ||
5 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess" | ||
6 | ### ATmega16U4 | ||
7 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess" | ||
8 | ### ATmega32U4 | ||
9 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess" | ||
10 | ### AT90USB64 | ||
11 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess" | ||
12 | ### AT90USB162 | ||
13 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffa", TAG+="uaccess" | ||
14 | ### AT90USB128 | ||
15 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess" | ||
16 | |||
17 | # Input Club | ||
18 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess" | ||
19 | |||
20 | # STM32duino | ||
21 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess" | ||
22 | # STM32 DFU | ||
23 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess" | ||
24 | |||
25 | # BootloadHID | ||
26 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess" | ||
27 | |||
28 | # USBAspLoader | ||
29 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uaccess" | ||
30 | |||
31 | # ModemManager should ignore the following devices | ||
32 | # Atmel SAM-BA (Massdrop) | ||
33 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
34 | |||
35 | # Caterina (Pro Micro) | ||
36 | ## pid.codes shared PID | ||
37 | ### Keyboardio Atreus 2 Bootloader | ||
38 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
39 | ## Spark Fun Electronics | ||
40 | ### Pro Micro 3V3/8MHz | ||
41 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
42 | ### Pro Micro 5V/16MHz | ||
43 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
44 | ### LilyPad 3V3/8MHz (and some Pro Micro clones) | ||
45 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
46 | ## Pololu Electronics | ||
47 | ### A-Star 32U4 | ||
48 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
49 | ## Arduino SA | ||
50 | ### Leonardo | ||
51 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
52 | ### Micro | ||
53 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
54 | ## Adafruit Industries LLC | ||
55 | ### Feather 32U4 | ||
56 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
57 | ### ItsyBitsy 32U4 3V3/8MHz | ||
58 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
59 | ### ItsyBitsy 32U4 5V/16MHz | ||
60 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
61 | ## dog hunter AG | ||
62 | ### Leonardo | ||
63 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
64 | ### Micro | ||
65 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" | ||
66 | |||
67 | # hid_listen | ||
68 | KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl" | ||
69 | |||
70 | # hid bootloaders | ||
71 | ## QMK HID | ||
72 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2067", TAG+="uaccess" | ||
73 | ## PJRC's HalfKay | ||
74 | SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0478", TAG+="uaccess" | ||