aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.lock244
-rw-r--r--flake.nix65
-rw-r--r--font.nix2
-rw-r--r--hosts/laurel/configuration.nix91
-rw-r--r--hosts/laurel/hardware-configuration.nix7
-rw-r--r--hosts/laurel/servarr.nix8
-rw-r--r--hosts/mantis/configuration.nix246
-rw-r--r--hosts/mantis/hardware-configuration.nix16
-rw-r--r--hosts/mantis/home.nix103
-rw-r--r--hosts/mantis/niri-config.kdl470
-rw-r--r--hosts/myrtle/configuration.nix9
-rw-r--r--hosts/myrtle/home.nix133
-rw-r--r--hosts/olive/configuration.nix147
-rw-r--r--hosts/olive/hardware-configuration.nix36
-rw-r--r--hosts/olive/qmk.rules74
-rw-r--r--patches/2bwm/nerd-patch.diff2
-rw-r--r--programs/alacritty.nix63
-rw-r--r--programs/atuin.nix20
-rw-r--r--programs/bash.nix16
-rw-r--r--programs/default.nix22
-rw-r--r--programs/fuzzel.nix42
-rw-r--r--programs/fzf.nix2
-rw-r--r--programs/git.nix14
-rw-r--r--programs/init.vim36
-rw-r--r--programs/neovim.nix2
-rw-r--r--programs/readline.nix1
-rw-r--r--programs/rofi.nix19
-rw-r--r--programs/st/config.h4
-rw-r--r--programs/tmux.nix14
-rw-r--r--scripts/battery.nix6
-rw-r--r--scripts/default.nix6
-rw-r--r--scripts/up.nix8
-rw-r--r--services/default.nix2
-rw-r--r--services/sxhkd.nix29
-rw-r--r--theme/default.nix4
-rw-r--r--theme/material-darker.nix18
-rw-r--r--theme/tomorrow-night.nix18
-rw-r--r--x/default.nix2
-rw-r--r--x/rxvt.nix6
-rw-r--r--x/xft.nix2
40 files changed, 1360 insertions, 649 deletions
diff --git a/flake.lock b/flake.lock
index d485422..9faf5d0 100644
--- a/flake.lock
+++ b/flake.lock
@@ -20,42 +20,21 @@
20 "url": "https://git.peppe.rs/vim/better-text-objs" 20 "url": "https://git.peppe.rs/vim/better-text-objs"
21 } 21 }
22 }, 22 },
23 "flaresolverr": { 23 "flake-parts": {
24 "inputs": { 24 "inputs": {
25 "flaresolverr-src": "flaresolverr-src", 25 "nixpkgs-lib": "nixpkgs-lib"
26 "nixpkgs": [
27 "nixpkgs"
28 ],
29 "undetected-chromedriver-src": "undetected-chromedriver-src"
30 }, 26 },
31 "locked": { 27 "locked": {
32 "lastModified": 1710267135, 28 "lastModified": 1727826117,
33 "narHash": "sha256-OPVcNqdxVoof8M887UQq6IVfPTqQVNXD3lu9HEd6pXU=", 29 "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
34 "ref": "refs/heads/master", 30 "owner": "hercules-ci",
35 "rev": "ea3256ae93f22449c70f78123d8019d23a9d7ff6", 31 "repo": "flake-parts",
36 "revCount": 3, 32 "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
37 "type": "git",
38 "url": "https://git.peppe.rs/flakes/flaresolverr"
39 },
40 "original": {
41 "type": "git",
42 "url": "https://git.peppe.rs/flakes/flaresolverr"
43 }
44 },
45 "flaresolverr-src": {
46 "flake": false,
47 "locked": {
48 "lastModified": 1709156333,
49 "narHash": "sha256-pf5sibZ9Vjc98UOVTEUlKrBoXXKiykrt+szXLbNJB3k=",
50 "owner": "FlareSolverr",
51 "repo": "FlareSolverr",
52 "rev": "fd773e59097c1aca4e08edc07c1ed30164f88bd3",
53 "type": "github" 33 "type": "github"
54 }, 34 },
55 "original": { 35 "original": {
56 "owner": "FlareSolverr", 36 "owner": "hercules-ci",
57 "ref": "v3.3.16", 37 "repo": "flake-parts",
58 "repo": "FlareSolverr",
59 "type": "github" 38 "type": "github"
60 } 39 }
61 }, 40 },
@@ -66,11 +45,11 @@
66 ] 45 ]
67 }, 46 },
68 "locked": { 47 "locked": {
69 "lastModified": 1710532761, 48 "lastModified": 1730016908,
70 "narHash": "sha256-SUXGZNrXX05YA9G6EmgupxhOr3swI1gcxLUeDMUhrEY=", 49 "narHash": "sha256-bFCxJco7d8IgmjfNExNz9knP8wvwbXU4s/d53KOK6U0=",
71 "owner": "nix-community", 50 "owner": "nix-community",
72 "repo": "home-manager", 51 "repo": "home-manager",
73 "rev": "206f457fffdb9a73596a4cb2211a471bd305243d", 52 "rev": "e83414058edd339148dc142a8437edb9450574c8",
74 "type": "github" 53 "type": "github"
75 }, 54 },
76 "original": { 55 "original": {
@@ -79,13 +58,72 @@
79 "type": "github" 58 "type": "github"
80 } 59 }
81 }, 60 },
61 "niri": {
62 "inputs": {
63 "flake-parts": "flake-parts",
64 "niri-stable": "niri-stable",
65 "niri-unstable": "niri-unstable",
66 "nixpkgs": [
67 "nixpkgs"
68 ],
69 "nixpkgs-stable": "nixpkgs-stable",
70 "xwayland-satellite-stable": "xwayland-satellite-stable",
71 "xwayland-satellite-unstable": "xwayland-satellite-unstable"
72 },
73 "locked": {
74 "lastModified": 1730267238,
75 "narHash": "sha256-Qwr72PbHBmc88UeLtm7K6/PJ0cfJjq8p2R4lsHA4cWw=",
76 "owner": "sodiboo",
77 "repo": "niri-flake",
78 "rev": "92d467d0c2dc8aeade9d858c95104b6a678cd9c0",
79 "type": "github"
80 },
81 "original": {
82 "owner": "sodiboo",
83 "repo": "niri-flake",
84 "type": "github"
85 }
86 },
87 "niri-stable": {
88 "flake": false,
89 "locked": {
90 "lastModified": 1726304152,
91 "narHash": "sha256-4YDrKMwXGVOBkeaISbxqf24rLuHvO98TnqxWYfgiSeg=",
92 "owner": "YaLTeR",
93 "repo": "niri",
94 "rev": "6a48728ffb1e638839b07f9ab2f06b2adb41dc61",
95 "type": "github"
96 },
97 "original": {
98 "owner": "YaLTeR",
99 "ref": "v0.1.9",
100 "repo": "niri",
101 "type": "github"
102 }
103 },
104 "niri-unstable": {
105 "flake": false,
106 "locked": {
107 "lastModified": 1730263923,
108 "narHash": "sha256-HFOXeh+WNtAwuV/KNtOSKXGnOoy465a/dud2zvtsCt8=",
109 "owner": "YaLTeR",
110 "repo": "niri",
111 "rev": "d3e72245b003cbeed0810bf00c4a445b7c8a652a",
112 "type": "github"
113 },
114 "original": {
115 "owner": "YaLTeR",
116 "repo": "niri",
117 "type": "github"
118 }
119 },
82 "nixos-hardware": { 120 "nixos-hardware": {
83 "locked": { 121 "locked": {
84 "lastModified": 1662714967, 122 "lastModified": 1730161780,
85 "narHash": "sha256-IOTq5tAGGmBFj7tQbkcyLE261JUeTUucEE3p0WLZ4qM=", 123 "narHash": "sha256-z5ILcmwMtiCoHTXS1KsQWqigO7HJO8sbyK7f7wn9F/E=",
86 "owner": "nixos", 124 "owner": "nixos",
87 "repo": "nixos-hardware", 125 "repo": "nixos-hardware",
88 "rev": "1fec8fda86dac5701146c77d5f8a414b14ed1ff6", 126 "rev": "07d15e8990d5d86a631641b4c429bc0a7400cfb8",
89 "type": "github" 127 "type": "github"
90 }, 128 },
91 "original": { 129 "original": {
@@ -96,11 +134,11 @@
96 }, 134 },
97 "nixpkgs": { 135 "nixpkgs": {
98 "locked": { 136 "locked": {
99 "lastModified": 1710534455, 137 "lastModified": 1730045389,
100 "narHash": "sha256-huQT4Xs0y4EeFKn2BTBVYgEwJSv8SDlm82uWgMnCMmI=", 138 "narHash": "sha256-4spSNTZ6h8Xmvrr9oqfuxc9jarasGj1QOcsgw8BfNd8=",
101 "owner": "NixOS", 139 "owner": "NixOS",
102 "repo": "nixpkgs", 140 "repo": "nixpkgs",
103 "rev": "9af9c1c87ed3e3ed271934cb896e0cdd33dae212", 141 "rev": "0fcb98acb6633445764dafe180e6833eb0f95208",
104 "type": "github" 142 "type": "github"
105 }, 143 },
106 "original": { 144 "original": {
@@ -110,6 +148,50 @@
110 "type": "github" 148 "type": "github"
111 } 149 }
112 }, 150 },
151 "nixpkgs-lib": {
152 "locked": {
153 "lastModified": 1727825735,
154 "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=",
155 "type": "tarball",
156 "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
157 },
158 "original": {
159 "type": "tarball",
160 "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz"
161 }
162 },
163 "nixpkgs-stable": {
164 "locked": {
165 "lastModified": 1730137625,
166 "narHash": "sha256-9z8oOgFZiaguj+bbi3k4QhAD6JabWrnv7fscC/mt0KE=",
167 "owner": "NixOS",
168 "repo": "nixpkgs",
169 "rev": "64b80bfb316b57cdb8919a9110ef63393d74382a",
170 "type": "github"
171 },
172 "original": {
173 "owner": "NixOS",
174 "ref": "nixos-24.05",
175 "repo": "nixpkgs",
176 "type": "github"
177 }
178 },
179 "nixpkgs_2": {
180 "locked": {
181 "lastModified": 1724748588,
182 "narHash": "sha256-NlpGA4+AIf1dKNq76ps90rxowlFXUsV9x7vK/mN37JM=",
183 "owner": "nixos",
184 "repo": "nixpkgs",
185 "rev": "a6292e34000dc93d43bccf78338770c1c5ec8a99",
186 "type": "github"
187 },
188 "original": {
189 "owner": "nixos",
190 "ref": "nixpkgs-unstable",
191 "repo": "nixpkgs",
192 "type": "github"
193 }
194 },
113 "prompt": { 195 "prompt": {
114 "inputs": { 196 "inputs": {
115 "nixpkgs": [ 197 "nixpkgs": [
@@ -130,51 +212,87 @@
130 "url": "https://git.peppe.rs/cli/prompt" 212 "url": "https://git.peppe.rs/cli/prompt"
131 } 213 }
132 }, 214 },
215 "readit": {
216 "inputs": {
217 "nixpkgs": "nixpkgs_2"
218 },
219 "locked": {
220 "lastModified": 1730847014,
221 "narHash": "sha256-ZnXEn7bUg43yeePXkG8THfCQTC7YmchigPnOx3pd0+w=",
222 "ref": "refs/heads/master",
223 "rev": "276f8e058d831429f171293e399f43c94719a504",
224 "revCount": 32,
225 "type": "git",
226 "url": "https://git.peppe.rs/web/readit"
227 },
228 "original": {
229 "type": "git",
230 "url": "https://git.peppe.rs/web/readit"
231 }
232 },
133 "root": { 233 "root": {
134 "inputs": { 234 "inputs": {
135 "better-text-objs": "better-text-objs", 235 "better-text-objs": "better-text-objs",
136 "flaresolverr": "flaresolverr",
137 "home-manager": "home-manager", 236 "home-manager": "home-manager",
237 "niri": "niri",
138 "nixos-hardware": "nixos-hardware", 238 "nixos-hardware": "nixos-hardware",
139 "nixpkgs": "nixpkgs", 239 "nixpkgs": "nixpkgs",
140 "prompt": "prompt", 240 "prompt": "prompt",
241 "readit": "readit",
141 "vim-colors-plain": "vim-colors-plain" 242 "vim-colors-plain": "vim-colors-plain"
142 } 243 }
143 }, 244 },
144 "undetected-chromedriver-src": { 245 "vim-colors-plain": {
145 "flake": false, 246 "inputs": {
247 "nixpkgs": [
248 "nixpkgs"
249 ]
250 },
146 "locked": { 251 "locked": {
147 "lastModified": 1708190030, 252 "lastModified": 1730272245,
148 "narHash": "sha256-Qe+GrsUPnhjJMDgjdUCloapjj0ggFlm/Dr42WLcmb1o=", 253 "narHash": "sha256-B5ADR+N8297uv9i6HazGaT/uSXM5aJ9RpXNnVQPQPQI=",
149 "owner": "ultrafunkamsterdam", 254 "owner": "oppiliappan",
150 "repo": "undetected-chromedriver", 255 "repo": "vim-colors-plain",
151 "rev": "0aa5fbe252370b4cb2b95526add445392cad27ba", 256 "rev": "d9b9c11a55ec5500c65d062490f60ea707eb46c8",
152 "type": "github" 257 "type": "github"
153 }, 258 },
154 "original": { 259 "original": {
155 "owner": "ultrafunkamsterdam", 260 "owner": "oppiliappan",
156 "repo": "undetected-chromedriver", 261 "repo": "vim-colors-plain",
157 "type": "github" 262 "type": "github"
158 } 263 }
159 }, 264 },
160 "vim-colors-plain": { 265 "xwayland-satellite-stable": {
161 "inputs": { 266 "flake": false,
162 "nixpkgs": [ 267 "locked": {
163 "nixpkgs" 268 "lastModified": 1718165778,
164 ] 269 "narHash": "sha256-dwF9nI54a6Fo9XU5s4qmvMXSgCid3YQVGxch00qEMvI=",
270 "owner": "Supreeeme",
271 "repo": "xwayland-satellite",
272 "rev": "b6d281967cb0b7bf1dfdb8d0f597b517dc4aa5c5",
273 "type": "github"
165 }, 274 },
275 "original": {
276 "owner": "Supreeeme",
277 "ref": "v0.4",
278 "repo": "xwayland-satellite",
279 "type": "github"
280 }
281 },
282 "xwayland-satellite-unstable": {
283 "flake": false,
166 "locked": { 284 "locked": {
167 "lastModified": 1702647482, 285 "lastModified": 1730258684,
168 "narHash": "sha256-HLDqIfRjzb3YAdpjBW7iN2YCWWxSkTgu+MzKV5+H/WQ=", 286 "narHash": "sha256-E+69sdxUhPSNI8+JlTL6KKbNv5qVD3L1y8hdVO37A44=",
169 "ref": "refs/heads/master", 287 "owner": "Supreeeme",
170 "rev": "bfa854ec04e0dab4c69911595d0653a34f626f1d", 288 "repo": "xwayland-satellite",
171 "revCount": 58, 289 "rev": "b0ee6db9fa9901c675b3c7e952c2a8ce987a0f58",
172 "type": "git", 290 "type": "github"
173 "url": "https://git.peppe.rs/vim/vim-colors-plain"
174 }, 291 },
175 "original": { 292 "original": {
176 "type": "git", 293 "owner": "Supreeeme",
177 "url": "https://git.peppe.rs/vim/vim-colors-plain" 294 "repo": "xwayland-satellite",
295 "type": "github"
178 } 296 }
179 } 297 }
180 }, 298 },
diff --git a/flake.nix b/flake.nix
index 55ed146..aab11c1 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,12 +2,12 @@
2 description = "nerdypepper's nixos config"; 2 description = "nerdypepper's nixos config";
3 3
4 inputs = { 4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; 5 nixpkgs.url = github:NixOS/nixpkgs/nixpkgs-unstable;
6 6
7 nixos-hardware.url = "github:nixos/nixos-hardware"; 7 nixos-hardware.url = "github:nixos/nixos-hardware";
8 8
9 home-manager = { 9 home-manager = {
10 url = "github:nix-community/home-manager"; 10 url = github:nix-community/home-manager;
11 inputs.nixpkgs.follows = "nixpkgs"; 11 inputs.nixpkgs.follows = "nixpkgs";
12 }; 12 };
13 13
@@ -22,15 +22,24 @@
22 }; 22 };
23 23
24 vim-colors-plain = { 24 vim-colors-plain = {
25 url = "git+https://git.peppe.rs/vim/vim-colors-plain"; 25 url = "github:oppiliappan/vim-colors-plain";
26 inputs.nixpkgs.follows = "nixpkgs"; 26 inputs.nixpkgs.follows = "nixpkgs";
27 }; 27 };
28 28
29 flaresolverr = { 29 # flaresolverr = {
30 url = "git+https://git.peppe.rs/flakes/flaresolverr"; 30 # url = "git+https://git.peppe.rs/flakes/flaresolverr";
31 # inputs.nixpkgs.follows = "nixpkgs";
32 # };
33
34 niri = {
35 url = "github:sodiboo/niri-flake";
31 inputs.nixpkgs.follows = "nixpkgs"; 36 inputs.nixpkgs.follows = "nixpkgs";
32 }; 37 };
33 38
39 readit = {
40 url = "git+https://git.peppe.rs/web/readit";
41 };
42
34 }; 43 };
35 44
36 outputs = 45 outputs =
@@ -41,7 +50,9 @@
41 , prompt 50 , prompt
42 , better-text-objs 51 , better-text-objs
43 , vim-colors-plain 52 , vim-colors-plain
44 , flaresolverr 53 # , flaresolverr
54 , niri
55 , readit
45 , ... 56 , ...
46 } @ inputs: { 57 } @ inputs: {
47 58
@@ -50,18 +61,20 @@
50 prompt = prompt.overlay; 61 prompt = prompt.overlay;
51 better-text-objs = better-text-objs.overlay; 62 better-text-objs = better-text-objs.overlay;
52 vim-colors-plain = vim-colors-plain.overlay; 63 vim-colors-plain = vim-colors-plain.overlay;
53 flaresolverr = flaresolverr.overlays.default; 64 # flaresolverr = flaresolverr.overlays.default;
65 niri = niri.overlays.niri;
54 }; 66 };
55 67
56 formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt; 68 formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt;
57 69
58 nixosConfigurations = { 70 nixosConfigurations = {
59 olive = nixpkgs.lib.nixosSystem { 71
72 myrtle = nixpkgs.lib.nixosSystem {
60 system = "x86_64-linux"; 73 system = "x86_64-linux";
61 modules = [ 74 modules = [
62 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; }) 75 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
63 { 76 {
64 imports = [ ./hosts/olive/configuration.nix ]; 77 imports = [ ./hosts/myrtle/configuration.nix ];
65 _module.args.self = self; 78 _module.args.self = self;
66 } 79 }
67 home-manager.nixosModules.home-manager 80 home-manager.nixosModules.home-manager
@@ -69,48 +82,45 @@
69 home-manager.useGlobalPkgs = true; 82 home-manager.useGlobalPkgs = true;
70 home-manager.useUserPackages = true; 83 home-manager.useUserPackages = true;
71 home-manager.users.np = { 84 home-manager.users.np = {
72 imports = [ ./home.nix ]; 85 imports = [ ./hosts/myrtle/home.nix ];
73 _module.args.self = self; 86 _module.args.self = self;
74 _module.args.inputs = inputs; 87 _module.args.inputs = inputs;
75 _module.args.theme = import ./theme; 88 _module.args.theme = import ./theme;
89 _module.args.font = import ./font.nix;
76 }; 90 };
77 } 91 }
92 nixos-hardware.nixosModules.asus-battery
78 ]; 93 ];
79 }; 94 };
80 95
81 myrtle = nixpkgs.lib.nixosSystem { 96 mantis = nixpkgs.lib.nixosSystem {
82 system = "x86_64-linux"; 97 system = "x86_64-linux";
83 modules = [ 98 modules = [
84 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; }) 99 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
85 { 100 {
86 imports = [ ./hosts/myrtle/configuration.nix ]; 101 imports = [ ./hosts/mantis/configuration.nix ];
87 _module.args.self = self; 102 _module.args.self = self;
88 } 103 }
89 home-manager.nixosModules.home-manager 104 home-manager.nixosModules.home-manager
90 { 105 {
91 home-manager.useGlobalPkgs = true; 106 home-manager.useGlobalPkgs = true;
92 home-manager.useUserPackages = true; 107 home-manager.useUserPackages = true;
93 home-manager.users.np = { 108 home-manager.users.op = {
94 imports = [ ./home.nix ]; 109 imports = [ ./hosts/mantis/home.nix ];
95 _module.args.self = self; 110 _module.args.self = self;
96 _module.args.inputs = inputs; 111 _module.args.inputs = inputs;
97 _module.args.theme = import ./theme; 112 _module.args.theme = import ./theme;
98 _module.args.font = import ./font.nix; 113 _module.args.font = import ./font.nix;
99 }; 114 };
100 } 115 }
101 nixos-hardware.nixosModules.asus-battery
102 ];
103 };
104 116
105 mantis = nixpkgs.lib.nixosSystem { 117 # {
106 system = "x86_64-linux"; 118 # imports = [niri.nixosModules.niri];
107 modules = [ 119 # nixpkgs.overlays = [niri.overlays.niri];
108 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; }) 120 # programs.niri.enable = true;
109 { 121 # programs.niri.config = builtins.readFile ./hosts/mantis/niri-config.kdl;
110 imports = [ ./hosts/mantis/configuration.nix ]; 122 # }
111 _module.args.self = self; 123
112 }
113 flaresolverr.nixosModules.default
114 ]; 124 ];
115 }; 125 };
116 126
@@ -122,7 +132,8 @@
122 imports = [ ./hosts/laurel/configuration.nix ]; 132 imports = [ ./hosts/laurel/configuration.nix ];
123 _module.args.self = self; 133 _module.args.self = self;
124 } 134 }
125 flaresolverr.nixosModules.default 135 # flaresolverr.nixosModules.default
136 readit.nixosModules.default
126 ]; 137 ];
127 }; 138 };
128 139
diff --git a/font.nix b/font.nix
index 74afcdd..17b3978 100644
--- a/font.nix
+++ b/font.nix
@@ -1,3 +1,3 @@
1{ 1{
2 name = "Nerd Input"; 2 name = "InputMono";
3} 3}
diff --git a/hosts/laurel/configuration.nix b/hosts/laurel/configuration.nix
index a2559ae..e824853 100644
--- a/hosts/laurel/configuration.nix
+++ b/hosts/laurel/configuration.nix
@@ -33,9 +33,9 @@
33 }; 33 };
34 34
35 # Enable sound. 35 # Enable sound.
36 sound.enable = true; 36 # sound.enable = true;
37 hardware.pulseaudio.enable = true; 37 hardware.pulseaudio.enable = true;
38 hardware.opengl = { 38 hardware.graphics = {
39 enable = true; 39 enable = true;
40 extraPackages = with pkgs; [ 40 extraPackages = with pkgs; [
41 intel-media-driver 41 intel-media-driver
@@ -63,7 +63,7 @@
63 63
64 users.users.op = { 64 users.users.op = {
65 isNormalUser = true; 65 isNormalUser = true;
66 extraGroups = [ "wheel" "tty" ]; 66 extraGroups = [ "wheel" "tty" "syncthing" ];
67 home = "/home/op"; 67 home = "/home/op";
68 openssh.authorizedKeys.keys = [ 68 openssh.authorizedKeys.keys = [
69 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG4oThdAy5wQtzCarxDPuzWX6ImYw0c1QfkF0+wZNE6o np@myrtle" 69 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG4oThdAy5wQtzCarxDPuzWX6ImYw0c1QfkF0+wZNE6o np@myrtle"
@@ -77,7 +77,7 @@
77 }; 77 };
78 78
79 services.invidious = { 79 services.invidious = {
80 enable = true; 80 enable = false;
81 port = 3333; 81 port = 3333;
82 domain = "tube.laurel"; 82 domain = "tube.laurel";
83 settings = { 83 settings = {
@@ -114,18 +114,6 @@
114 }; 114 };
115 }; 115 };
116 116
117 services.podgrab = {
118 enable = true;
119 port = 3434;
120 };
121 services.nginx.virtualHosts."podcast.laurel" = {
122 listen = [{ port = 80; addr = "0.0.0.0"; }];
123 locations."/" = {
124 proxyPass = "http://127.0.0.1:${builtins.toString config.services.podgrab.port}";
125 proxyWebsockets = true;
126 };
127 };
128
129 services.miniflux = { 117 services.miniflux = {
130 enable = true; 118 enable = true;
131 adminCredentialsFile = "/etc/miniflux/admin"; 119 adminCredentialsFile = "/etc/miniflux/admin";
@@ -152,7 +140,7 @@
152 }; 140 };
153 141
154 services.matrix-conduit = { 142 services.matrix-conduit = {
155 enable = true; 143 enable = false;
156 settings = { 144 settings = {
157 global = { 145 global = {
158 allow_encryption = true; 146 allow_encryption = true;
@@ -166,6 +154,75 @@
166 }; 154 };
167 }; 155 };
168 }; 156 };
157 services.mautrix-whatsapp = {
158 enable = false;
159 settings = {
160 homeserver = {
161 address = "http://localhost:6197";
162 domain = "oppi.li";
163 };
164 appservice = { };
165 bridge = {
166 encryption = {
167 allow = true;
168 default = true;
169 require = true;
170 };
171 history_sync = {
172 request_full_sync = true;
173 };
174 mute_bridging = true;
175 permissions = {
176 "*" = "user";
177 };
178 private_chat_portal_meta = true;
179 provisioning = {
180 shared_secret = "disable";
181 };
182 };
183
184 };
185 };
186
187 services.radicale = {
188 enable = true;
189 settings = {
190 server.hosts = [ "0.0.0.0:5232" ];
191 auth = {
192 type = "htpasswd";
193 htpasswd_filename = "/etc/radicale/users";
194 htpasswd_encryption = "bcrypt";
195 };
196 };
197 };
198 services.nginx.virtualHosts."radicale.laurel" = {
199 listen = [{ port = 80; addr = "0.0.0.0"; }];
200 locations."/" = {
201 proxyPass = "http://127.0.0.1:5232";
202 };
203 };
204
205 services.syncthing = {
206 enable = true;
207 dataDir = "/syncthing";
208 };
209 services.nginx.virtualHosts."sync.laurel" = {
210 listen = [{ port = 80; addr = "0.0.0.0"; }];
211 locations."/" = {
212 proxyPass = "http://127.0.0.1:8384";
213 };
214 };
215
216 services.readit = {
217 enable = true;
218 port = 9495;
219 };
220 services.nginx.virtualHosts."read.laurel" = {
221 listen = [{ port = 80; addr = "0.0.0.0"; }];
222 locations."/" = {
223 proxyPass = "http://127.0.0.1:9495";
224 };
225 };
169 226
170 227
171 nix.settings.experimental-features = [ "nix-command" "flakes" ]; 228 nix.settings.experimental-features = [ "nix-command" "flakes" ];
diff --git a/hosts/laurel/hardware-configuration.nix b/hosts/laurel/hardware-configuration.nix
index 142c4a7..cd34eae 100644
--- a/hosts/laurel/hardware-configuration.nix
+++ b/hosts/laurel/hardware-configuration.nix
@@ -20,6 +20,13 @@
20 fsType = "ext4"; 20 fsType = "ext4";
21 }; 21 };
22 22
23 fileSystems."/servarr" =
24 {
25 device = "/dev/sdb";
26 fsType = "ext4";
27 };
28
29
23 fileSystems."/boot" = 30 fileSystems."/boot" =
24 { 31 {
25 device = "/dev/disk/by-uuid/FDC2-EFD1"; 32 device = "/dev/disk/by-uuid/FDC2-EFD1";
diff --git a/hosts/laurel/servarr.nix b/hosts/laurel/servarr.nix
index e300759..e9c06c4 100644
--- a/hosts/laurel/servarr.nix
+++ b/hosts/laurel/servarr.nix
@@ -1,8 +1,12 @@
1{ config, lib, pkgs, ... }: 1{ self, config, lib, pkgs, ... }:
2 2
3{ 3{
4 imports = [ ]; 4 imports = [ ];
5 5
6 nixpkgs.overlays = with self.overlays; [
7 #flaresolverr
8 ];
9
6 users.groups."torrent".members = [ 10 users.groups."torrent".members = [
7 "op" 11 "op"
8 "sonarr" 12 "sonarr"
@@ -96,6 +100,8 @@
96 }; 100 };
97 }; 101 };
98 102
103 services.flaresolverr.enable = true;
104
99} 105}
100 106
101 107
diff --git a/hosts/mantis/configuration.nix b/hosts/mantis/configuration.nix
index 8f71964..d96f321 100644
--- a/hosts/mantis/configuration.nix
+++ b/hosts/mantis/configuration.nix
@@ -1,5 +1,3 @@
1# Edit this configuration file to define what should be installed on
2# your system. Help is available in the configuration.nix(5) man page, on
3# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). 1# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
4 2
5{ config, lib, pkgs, self, ... }: 3{ config, lib, pkgs, self, ... }:
@@ -11,217 +9,94 @@
11 ./hardware-configuration.nix 9 ./hardware-configuration.nix
12 ]; 10 ];
13 11
14 nixpkgs.overlays = with self.overlays; [
15 flaresolverr
16 ];
17
18 # Use the systemd-boot EFI boot loader. 12 # Use the systemd-boot EFI boot loader.
19 boot.loader.systemd-boot.enable = true; 13 boot.loader.systemd-boot.enable = true;
20 boot.loader.efi.canTouchEfiVariables = true; 14 boot.loader.efi.canTouchEfiVariables = true;
15 boot.kernelPackages = pkgs.linuxPackages_latest;
16 boot.kernelParams = [ "i915.force_probe=4650" ];
21 17
22 networking.hostName = "mantis"; # Define your hostname. 18 networking.hostName = "mantis";
23 networking.wireless.iwd.enable = true; # Enables wireless support via wpa_supplicant.
24 networking.firewall.allowedTCPPorts = [ 80 443 ];
25
26 time.timeZone = "Europe/London"; 19 time.timeZone = "Europe/London";
27 i18n.defaultLocale = "en_US.UTF-8";
28 20
29 nixpkgs.config.packageOverrides = pkgs: { 21 nixpkgs.overlays = with self.overlays; [
30 vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; 22 prompt
31 }; 23 better-text-objs
24 vim-colors-plain
25 ];
32 26
33 # Enable sound. 27 nixpkgs.config = {
34 sound.enable = true; 28 "2bwm".patches = [
35 hardware.pulseaudio.enable = true; 29 ../../patches/2bwm/nerd-patch.diff
36 hardware.opengl = {
37 enable = true;
38 extraPackages = with pkgs; [
39 intel-media-driver
40 vaapiIntel
41 vaapiVdpau
42 libvdpau-va-gl
43 intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
44 ]; 30 ];
31
32 st = {
33 conf = builtins.readFile ../../programs/st/config.h;
34 extraLibs = with pkgs; [ harfbuzz ];
35 patches = [
36 ../../patches/st/xres.diff
37 ../../patches/st/bright.diff
38 ../../patches/st/ligatures.diff
39 ];
40 };
45 }; 41 };
46 42
47 # Define a user account. Don't forget to set a password with ‘passwd’.
48 users.users.op = { 43 users.users.op = {
49 isNormalUser = true; 44 isNormalUser = true;
50 extraGroups = [ "wheel" "tty" ]; 45 extraGroups = [ "wheel" "docker" ];
51 packages = with pkgs; [ ]; 46 packages = with pkgs; [
52 home = "/home/op"; 47 qutebrowser
53 openssh.authorizedKeys.keys = [ 48 tree
54 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILzFK/zY2ZaAftBfFPO+IJAgyD45pe0fXrpF81p8aNIl np@myrtle"
55 ]; 49 ];
56 }; 50 createHome = true;
57 users.groups."torrent".members = [ 51 home = "/home/op";
58 "op"
59 "sonarr"
60 "radarr"
61 "bazarr"
62 "jackett"
63 "lidarr"
64 "jellyfin"
65 "transmission"
66 ];
67
68 environment.systemPackages = with pkgs; [
69 vim
70 wget
71 pkgs.jellyfin
72 pkgs.jellyfin-web
73 pkgs.jellyfin-ffmpeg
74
75 pkgs.htop
76 pkgs.ripgrep
77 pkgs.git
78 ];
79
80 services.openssh.enable = true;
81 services.nginx.enable = true;
82 services.tailscale.enable = true;
83
84 services.jellyfin = {
85 enable = true;
86 openFirewall = true;
87 group = "torrent";
88 };
89 services.nginx.virtualHosts."stream.mantis" = {
90 listen = [{ port = 80; addr = "0.0.0.0"; }];
91 locations."/" = {
92 proxyPass = "http://127.0.0.1:8096";
93 proxyWebsockets = true;
94 };
95 };
96
97 services.navidrome = {
98 enable = true;
99 openFirewall = true;
100 settings = {
101 MusicFolder = "/servarr/lidarr/";
102 DataFolder = "/etc/navidrome/data";
103 CacheFolder = "/etc/navidrome/cache";
104 Address = "0.0.0.0";
105 Port = 4533;
106 AuthRequestLimit = 0;
107 EnableTranscodingConfig = true;
108 };
109 };
110 services.nginx.virtualHosts."music.mantis" = {
111 listen = [{ port = 80; addr = "0.0.0.0"; }];
112 locations."/" = {
113 proxyPass = "http://127.0.0.1:4533";
114 proxyWebsockets = true;
115 };
116 };
117
118 services.transmission = {
119 enable = true;
120 openFirewall = true;
121 openRPCPort = true;
122 group = "torrent";
123 settings = {
124 download-dir = "/torrents";
125 incomplete-dir = "/.incomplete";
126 rpc-bind-address = "0.0.0.0";
127 rpc-whitelist = "127.0.0.1,10.0.0.1,192.168.*.*,100.64.*.*";
128 };
129 };
130 services.nginx.virtualHosts."torrent.mantis" = {
131 listen = [{ port = 80; addr = "0.0.0.0"; }];
132 locations."/" = {
133 proxyPass = "http://127.0.0.1:9091";
134 };
135 }; 52 };
136 53
137 services.sonarr = { 54 environment = {
138 enable = true; 55 systemPackages = with pkgs; [
139 openFirewall = true; 56 man-pages
140 group = "torrent"; 57 man-pages-posix
141 }; 58 (lib.hiPrio pkgs.bashInteractive)
142 services.nginx.virtualHosts."sonarr.mantis" = { 59 _2bwm
143 listen = [{ port = 80; addr = "0.0.0.0"; }]; 60 ];
144 locations."/" = { 61 variables = {
145 proxyPass = "http://127.0.0.1:8989"; 62 QT_SCALE_FACTOR_ROUNDING_POLICY = "RoundPreferFloor";
63 NIXOS_OZONE_WL = "1";
146 }; 64 };
147 }; 65 };
148 66
149 services.radarr = { 67 services = {
150 enable = true; 68 openssh = {
151 openFirewall = true; 69 enable = true;
152 group = "torrent"; 70 settings = {
153 }; 71 X11Forwarding = true;
154 services.nginx.virtualHosts."radarr.mantis" = { 72 PrintMotd = true;
155 listen = [{ port = 80; addr = "0.0.0.0"; }]; 73 };
156 locations."/" = {
157 proxyPass = "http://127.0.0.1:7878";
158 }; 74 };
159 }; 75 tailscale.enable = true;
160 76 libinput.enable = true;
161 services.bazarr = { 77 xserver = {
162 enable = true; 78 enable = true;
163 openFirewall = true; 79 displayManager.startx.enable = true;
164 group = "torrent";
165 };
166 services.nginx.virtualHosts."bazarr.mantis" = {
167 listen = [{ port = 80; addr = "0.0.0.0"; }];
168 locations."/" = {
169 proxyPass = "http://127.0.0.1:6767";
170 }; 80 };
171 }; 81 };
172 82
173 services.jackett = { 83 hardware.graphics.extraPackages = [
174 enable = true; 84 pkgs.vpl-gpu-rt
175 openFirewall = true; 85 ];
176 group = "torrent";
177 };
178 services.nginx.virtualHosts."jackett.mantis" = {
179 listen = [{ port = 80; addr = "0.0.0.0"; }];
180 locations."/" = {
181 proxyPass = "http://127.0.0.1:9117";
182 };
183 };
184 86
185 services.lidarr = { 87 services.pipewire = {
186 enable = true; 88 enable = true;
187 openFirewall = true; 89 alsa.enable = true;
188 group = "torrent"; 90 alsa.support32Bit = true;
91 pulse.enable = true;
92 jack.enable = true;
189 }; 93 };
190 services.nginx.virtualHosts."lidarr.mantis" = {
191 listen = [{ port = 80; addr = "0.0.0.0"; }];
192 locations."/" = {
193 proxyPass = "http://127.0.0.1:8686";
194 };
195 };
196
197 services.flaresolverr.enable = true;
198 94
199 services.radicale = {
200 enable = true;
201 settings = {
202 server.hosts = [ "0.0.0.0:5232" ];
203 auth = {
204 type = "htpasswd";
205 htpasswd_filename = "/etc/radicale/users";
206 htpasswd_encryption = "bcrypt";
207 };
208 };
209 };
210 services.nginx.virtualHosts."radicale.mantis" = {
211 listen = [{ port = 80; addr = "0.0.0.0"; }];
212 locations."/" = {
213 proxyPass = "http://127.0.0.1:5232";
214 };
215 };
216 95
96 virtualisation.docker.enable = true;
217 97
218 nix.settings.experimental-features = [ "nix-command" "flakes" ]; 98 nix.settings.experimental-features = [ "nix-command" "flakes" ];
219 99
220 # Copy the NixOS configuration file and link it from the resulting system
221 # (/run/current-system/configuration.nix). This is useful in case you
222 # accidentally delete configuration.nix.
223 # system.copySystemConfiguration = true;
224
225 # This option defines the first version of NixOS you have installed on this particular machine, 100 # This option defines the first version of NixOS you have installed on this particular machine,
226 # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. 101 # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
227 # 102 #
@@ -229,7 +104,8 @@
229 # even if you've upgraded your system to a new NixOS release. 104 # even if you've upgraded your system to a new NixOS release.
230 # 105 #
231 # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, 106 # This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
232 # so changing it will NOT upgrade your system. 107 # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
108 # to actually do that.
233 # 109 #
234 # This value being lower than the current NixOS release does NOT mean your system is 110 # This value being lower than the current NixOS release does NOT mean your system is
235 # out of date, out of support, or vulnerable. 111 # out of date, out of support, or vulnerable.
@@ -238,7 +114,7 @@
238 # and migrated your data accordingly. 114 # and migrated your data accordingly.
239 # 115 #
240 # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . 116 # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
241 system.stateVersion = "23.11"; # Did you read the comment? 117 system.stateVersion = "24.05"; # Did you read the comment?
242 118
243} 119}
244 120
diff --git a/hosts/mantis/hardware-configuration.nix b/hosts/mantis/hardware-configuration.nix
index 6afcb08..bebdb21 100644
--- a/hosts/mantis/hardware-configuration.nix
+++ b/hosts/mantis/hardware-configuration.nix
@@ -9,31 +9,26 @@
9 (modulesPath + "/installer/scan/not-detected.nix") 9 (modulesPath + "/installer/scan/not-detected.nix")
10 ]; 10 ];
11 11
12 boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; 12 boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
13 boot.initrd.kernelModules = [ ]; 13 boot.initrd.kernelModules = [ ];
14 boot.kernelModules = [ "kvm-intel" ]; 14 boot.kernelModules = [ "kvm-intel" ];
15 boot.extraModulePackages = [ ]; 15 boot.extraModulePackages = [ ];
16 16
17 fileSystems."/" = 17 fileSystems."/" =
18 { 18 {
19 device = "/dev/disk/by-uuid/e3eda8a2-b5fe-4458-988c-48579a7cc6c6"; 19 device = "/dev/disk/by-uuid/efd94de4-c3fa-4a3b-98f9-66ccfb8479b9";
20 fsType = "ext4";
21 };
22
23 fileSystems."/servarr" =
24 {
25 device = "/dev/sdb";
26 fsType = "ext4"; 20 fsType = "ext4";
27 }; 21 };
28 22
29 fileSystems."/boot" = 23 fileSystems."/boot" =
30 { 24 {
31 device = "/dev/disk/by-uuid/A170-EC57"; 25 device = "/dev/disk/by-uuid/5BBB-E6FE";
32 fsType = "vfat"; 26 fsType = "vfat";
27 options = [ "fmask=0022" "dmask=0022" ];
33 }; 28 };
34 29
35 swapDevices = 30 swapDevices =
36 [{ device = "/dev/disk/by-uuid/61cb6a91-b916-40b9-b231-c04378629d90"; }]; 31 [{ device = "/dev/disk/by-uuid/65faea2e-c2ce-4ec2-8aca-e09e5073676b"; }];
37 32
38 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 33 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
39 # (the default) this is the recommended approach. When using systemd-networkd it's 34 # (the default) this is the recommended approach. When using systemd-networkd it's
@@ -41,7 +36,6 @@
41 # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 36 # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
42 networking.useDHCP = lib.mkDefault true; 37 networking.useDHCP = lib.mkDefault true;
43 # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; 38 # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
44 # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
45 39
46 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 40 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
47 hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 41 hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
diff --git a/hosts/mantis/home.nix b/hosts/mantis/home.nix
new file mode 100644
index 0000000..dfabeed
--- /dev/null
+++ b/hosts/mantis/home.nix
@@ -0,0 +1,103 @@
1{ config
2, pkgs
3, theme
4, self
5, ...
6}:
7
8{
9
10 imports = [
11 ../../programs
12 ../../services
13 ../../x
14 # ./mail.nix
15 ];
16
17 # programs.niri.enable = false;
18 # programs.niri.config = builtins.readFile ./niri-config.kdl;
19
20 home.stateVersion = "22.11";
21 home.username = "op";
22 home.homeDirectory = "/home/op";
23 home.extraOutputsToInstall = [ "man" ];
24 home.packages = with pkgs; [
25
26 # essentials
27 vim
28 weechat
29 firefox
30 thunderbird
31 qutebrowser
32 unzip
33 tmux
34 ripgrep
35 miniserve
36 pfetch
37 st
38 rxvt-unicode
39 cmus
40 tree
41 w3m
42 noto-fonts-emoji
43 fd
44 du-dust
45 jq
46 libnotify
47 inotify-tools
48 pavucontrol
49 bc
50 killall
51 signal-desktop
52 alsa-utils
53
54 wget
55 curl
56 mosh
57
58 imagemagick
59 ffmpeg-full
60 mpv
61 slop
62 maim
63 arandr
64
65 # monitoring
66 stress
67 powertop
68
69 # input
70 xinput_calibrator
71 libinput
72
73 # wayland stuff
74 xclip
75 # wl-clipboard-rs
76 # swaybg
77
78 nixpkgs-fmt
79
80 ] ++ (import ../../scripts { inherit pkgs; });
81
82 xdg = {
83 userDirs = {
84 enable = true;
85 desktop = "\$HOME/desktop";
86 documents = "\$HOME/docs";
87 download = "\$HOME/dloads";
88 music = "\$HOME/music";
89 pictures = "\$HOME/pics";
90 videos = "\$HOME/vids";
91 };
92 };
93
94 xsession = {
95 enable = true;
96 windowManager.command = "2bwm";
97 initExtra = ''
98 ${pkgs.hsetroot}/bin/hsetroot -solid "${theme.base00}"
99 xrdb -load $HOME/.Xresources
100 '';
101 };
102
103}
diff --git a/hosts/mantis/niri-config.kdl b/hosts/mantis/niri-config.kdl
new file mode 100644
index 0000000..c2641e3
--- /dev/null
+++ b/hosts/mantis/niri-config.kdl
@@ -0,0 +1,470 @@
1// This config is in the KDL format: https://kdl.dev
2// "/-" comments out the following node.
3// Check the wiki for a full description of the configuration:
4// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
5
6// Input device configuration.
7// Find the full list of options on the wiki:
8// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
9input {
10 keyboard {
11 xkb {
12 // You can set rules, model, layout, variant and options.
13 // For more information, see xkeyboard-config(7).
14
15 // For example:
16 // layout "us,ru"
17 // options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
18 }
19 }
20
21 // Next sections include libinput settings.
22 // Omitting settings disables them, or leaves them at their default values.
23 touchpad {
24 // off
25 tap
26 // dwt
27 // dwtp
28 natural-scroll
29 // accel-speed 0.2
30 // accel-profile "flat"
31 // scroll-method "two-finger"
32 // disabled-on-external-mouse
33 }
34
35 mouse {
36 // off
37 // natural-scroll
38 // accel-speed 0.2
39 // accel-profile "flat"
40 // scroll-method "no-scroll"
41 }
42
43 // Uncomment this to make the mouse warp to the center of newly focused windows.
44 warp-mouse-to-focus
45
46 // Focus windows and outputs automatically when moving the mouse into them.
47 // focus-follows-mouse
48}
49
50// You can configure outputs by their name, which you can find
51// by running `niri msg outputs` while inside a niri instance.
52// The built-in laptop monitor is usually called "eDP-1".
53// Find more information on the wiki:
54// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
55// Remember to uncomment the node by removing "/-"!
56output "DP-1" {
57 // Uncomment this line to disable this output.
58 // off
59
60 // Resolution and, optionally, refresh rate of the output.
61 // The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
62 // If the refresh rate is omitted, niri will pick the highest refresh rate
63 // for the resolution.
64 // If the mode is omitted altogether or is invalid, niri will pick one automatically.
65 // Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
66 // mode "[email protected]"
67
68 // You can use integer or fractional scale, for example use 1.5 for 150% scale.
69 // scale 2
70
71 // Transform allows to rotate the output counter-clockwise, valid values are:
72 // normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
73 // transform "270"
74
75 // Position of the output in the global coordinate space.
76 // This affects directional monitor actions like "focus-monitor-left", and cursor movement.
77 // The cursor can only move between directly adjacent outputs.
78 // Output scale and rotation has to be taken into account for positioning:
79 // outputs are sized in logical, or scaled, pixels.
80 // For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
81 // so to put another output directly adjacent to it on the right, set its x to 1920.
82 // If the position is unset or results in an overlap, the output is instead placed
83 // automatically.
84 // position x=1280 y=0
85}
86
87// Settings that influence how windows are positioned and sized.
88// Find more information on the wiki:
89// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
90layout {
91 // Set gaps around windows in logical pixels.
92 gaps 24
93
94 // When to center a column when changing focus, options are:
95 // - "never", default behavior, focusing an off-screen column will keep at the left
96 // or right edge of the screen.
97 // - "always", the focused column will always be centered.
98 // - "on-overflow", focusing a column will center it if it doesn't fit
99 // together with the previously focused column.
100 center-focused-column "never"
101
102 // You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
103 preset-column-widths {
104 // Proportion sets the width as a fraction of the output width, taking gaps into account.
105 // For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
106 // The default preset widths are 1/3, 1/2 and 2/3 of the output.
107 proportion 0.3333
108 proportion 0.6666
109 proportion 1.0
110
111 // Fixed sets the width in logical pixels exactly.
112 // fixed 1920
113 }
114
115 // You can change the default width of the new windows.
116 default-column-width { proportion 0.3333; }
117 // If you leave the brackets empty, the windows themselves will decide their initial width.
118 // default-column-width {}
119
120 // By default focus ring and border are rendered as a solid background rectangle
121 // behind windows. That is, they will show up through semitransparent windows.
122 // This is because windows using client-side decorations can have an arbitrary shape.
123 //
124 // If you don't like that, you should uncomment `prefer-no-csd` below.
125 // Niri will draw focus ring and border *around* windows that agree to omit their
126 // client-side decorations.
127 //
128 // Alternatively, you can override it with a window rule called
129 // `draw-border-with-background`.
130
131 // You can change how the focus ring looks.
132 focus-ring {
133 // Uncomment this line to disable the focus ring.
134 off
135
136 // How many logical pixels the ring extends out from the windows.
137 width 5
138
139 // Colors can be set in a variety of ways:
140 // - CSS named colors: "red"
141 // - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
142 // - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
143
144 // Color of the ring on the active monitor.
145 active-color "#555555"
146
147 // Color of the ring on inactive monitors.
148 inactive-color "#222"
149
150 // You can also use gradients. They take precedence over solid colors.
151 // Gradients are rendered the same as CSS linear-gradient(angle, from, to).
152 // The angle is the same as in linear-gradient, and is optional,
153 // defaulting to 180 (top-to-bottom gradient).
154 // You can use any CSS linear-gradient tool on the web to set these up.
155 //
156 // active-gradient from="#FF5370" to="#79ffe1" angle=45
157
158 // You can also color the gradient relative to the entire view
159 // of the workspace, rather than relative to just the window itself.
160 // To do that, set relative-to="workspace-view".
161 //
162 // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
163 }
164
165 // You can also add a border. It's similar to the focus ring, but always visible.
166 border {
167 // The settings are the same as for the focus ring.
168 // If you enable the border, you probably want to disable the focus ring.
169 // off
170
171 width 1.5
172 inactive-color "#333333"
173 active-color "#777777"
174
175 // active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
176 // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
177 }
178
179 // Struts shrink the area occupied by windows, similarly to layer-shell panels.
180 // You can think of them as a kind of outer gaps. They are set in logical pixels.
181 // Left and right struts will cause the next window to the side to always be visible.
182 // Top and bottom struts will simply add outer gaps in addition to the area occupied by
183 // layer-shell panels and regular gaps.
184 struts {
185 left 24
186 right 24
187 // top 64
188 // bottom 64
189 }
190}
191
192// Add lines like this to spawn processes at startup.
193// Note that running niri as a session supports xdg-desktop-autostart,
194// which may be more convenient to use.
195// See the binds section below for more spawn examples.
196// spawn-at-startup "alacritty" "-e" "fish"
197spawn-at-startup "swaybg" "-i" "/home/op/dloads/leaves3.png" "-m" "tile"
198spawn-at-startup "dunst"
199
200// Uncomment this line to ask the clients to omit their client-side decorations if possible.
201// If the client will specifically ask for CSD, the request will be honored.
202// Additionally, clients will be informed that they are tiled, removing some rounded corners.
203// prefer-no-csd
204
205// You can change the path where screenshots are saved.
206// A ~ at the front will be expanded to the home directory.
207// The path is formatted with strftime(3) to give you the screenshot date and time.
208screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
209
210// You can also set this to null to disable saving screenshots to disk.
211// screenshot-path null
212
213// Animation settings.
214// The wiki explains how to configure individual animations:
215// https://github.com/YaLTeR/niri/wiki/Configuration:-Animations
216animations {
217 // Uncomment to turn off all animations.
218 // off
219
220 // Slow down all animations by this factor. Values below 1 speed them up instead.
221 // slowdown 3.0
222}
223
224// Window rules let you adjust behavior for individual windows.
225// Find more information on the wiki:
226// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
227
228// Work around WezTerm's initial configure bug
229// by setting an empty default-column-width.
230window-rule {
231 // This regular expression is intentionally made as specific as possible,
232 // since this is the default config, and we want no false positives.
233 // You can get away with just app-id="wezterm" if you want.
234 match app-id=r#"^org\.wezfurlong\.wezterm$"#
235 default-column-width {}
236}
237
238// Example: block out two password managers from screen capture.
239// (This example rule is commented out with a "/-" in front.)
240/-window-rule {
241 match app-id=r#"^org\.keepassxc\.KeePassXC$"#
242 match app-id=r#"^org\.gnome\.World\.Secrets$"#
243
244 block-out-from "screen-capture"
245
246 // Use this instead if you want them visible on third-party screenshot tools.
247 // block-out-from "screencast"
248}
249
250binds {
251 // Keys consist of modifiers separated by + signs, followed by an XKB key name
252 // in the end. To find an XKB name for a particular key, you may use a program
253 // like wev.
254 //
255 // "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
256 // when running as a winit window.
257 //
258 // Most actions that you can bind here can also be invoked programmatically with
259 // `niri msg action do-something`.
260
261 // Mod-Shift-/, which is usually the same as Mod-?,
262 // shows a list of important hotkeys.
263 Mod+Shift+Slash { show-hotkey-overlay; }
264
265 // Suggested binds for running programs: terminal, app launcher, screen locker.
266 Mod+Return { spawn "alacritty"; }
267 Mod+D { spawn "rofi" "-show" "combi"; }
268 Super+Alt+L { spawn "swaylock"; }
269
270 // You can also use a shell. Do this if you need pipes, multiple commands, etc.
271 // Note: the entire command goes as a single argument in the end.
272 // Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
273
274 // Example volume keys mappings for PipeWire & WirePlumber.
275 // The allow-when-locked=true property makes them work even when the session is locked.
276 XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
277 XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
278 XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
279 XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
280
281 Mod+Q { close-window; }
282
283 Mod+Left { focus-column-left; }
284 Mod+Down { focus-window-down; }
285 Mod+Up { focus-window-up; }
286 Mod+Right { focus-column-right; }
287 Mod+H { focus-column-left; }
288 Mod+N { focus-window-down; }
289 Mod+E { focus-window-up; }
290 Mod+I { focus-column-right; }
291
292 Mod+Shift+H { move-column-left; }
293 Mod+Shift+N { move-window-down; }
294 Mod+Shift+E { move-window-up; }
295 Mod+Shift+I { move-column-right; }
296 Mod+Ctrl+Shift+H { consume-or-expel-window-left; }
297 Mod+Ctrl+Shift+I { consume-or-expel-window-right; }
298 // Mod+Ctrl+H { move-column-left; }
299 // Mod+Ctrl+N { move-window-down; }
300 // Mod+Ctrl+E { move-window-up; }
301 // Mod+Ctrl+I { move-column-right; }
302
303 // Alternative commands that move across workspaces when reaching
304 // the first or last window in a column.
305 // Mod+J { focus-window-or-workspace-down; }
306 // Mod+K { focus-window-or-workspace-up; }
307 // Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
308 // Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
309
310 Mod+Shift+6 { focus-column-first; }
311 Mod+Shift+4 { focus-column-last; }
312 Mod+Ctrl+Home { move-column-to-first; }
313 Mod+Ctrl+End { move-column-to-last; }
314
315 // Mod+Shift+Left { focus-monitor-left; }
316 // Mod+Shift+Down { focus-monitor-down; }
317 // Mod+Shift+Up { focus-monitor-up; }
318 // Mod+Shift+Right { focus-monitor-right; }
319 // Mod+Shift+H { focus-monitor-left; }
320 // Mod+Shift+J { focus-monitor-down; }
321 // Mod+Shift+K { focus-monitor-up; }
322 // Mod+Shift+L { focus-monitor-right; }
323
324 // Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
325 // Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
326 // Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
327 // Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
328 // Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
329 // Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
330 // Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
331 // Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
332
333 // Alternatively, there are commands to move just a single window:
334 // Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
335 // ...
336
337 // And you can also move a whole workspace to another monitor:
338 // Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
339 // ...
340
341 // Mod+Page_Down { focus-workspace-down; }
342 // Mod+Page_Up { focus-workspace-up; }
343 // Mod+U { focus-workspace-down; }
344 // Mod+I { focus-workspace-up; }
345 // Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
346 // Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
347 // Mod+Ctrl+U { move-column-to-workspace-down; }
348 // Mod+Ctrl+I { move-column-to-workspace-up; }
349
350 // Alternatively, there are commands to move just a single window:
351 // Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
352 // ...
353
354 // Mod+Shift+Page_Down { move-workspace-down; }
355 // Mod+Shift+Page_Up { move-workspace-up; }
356 // Mod+Shift+U { move-workspace-down; }
357 // Mod+Shift+I { move-workspace-up; }
358
359 // You can bind mouse wheel scroll ticks using the following syntax.
360 // These binds will change direction based on the natural-scroll setting.
361 //
362 // To avoid scrolling through workspaces really fast, you can use
363 // the cooldown-ms property. The bind will be rate-limited to this value.
364 // You can set a cooldown on any bind, but it's most useful for the wheel.
365 Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
366 Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
367 Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
368 Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
369
370 Mod+WheelScrollRight { focus-column-right; }
371 Mod+WheelScrollLeft { focus-column-left; }
372 Mod+Ctrl+WheelScrollRight { move-column-right; }
373 Mod+Ctrl+WheelScrollLeft { move-column-left; }
374
375 // Usually scrolling up and down with Shift in applications results in
376 // horizontal scrolling; these binds replicate that.
377 Mod+Shift+WheelScrollDown { focus-column-right; }
378 Mod+Shift+WheelScrollUp { focus-column-left; }
379 Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
380 Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
381
382 // Similarly, you can bind touchpad scroll "ticks".
383 // Touchpad scrolling is continuous, so for these binds it is split into
384 // discrete intervals.
385 // These binds are also affected by touchpad's natural-scroll, so these
386 // example binds are "inverted", since we have natural-scroll enabled for
387 // touchpads by default.
388 // Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
389 // Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
390
391 // You can refer to workspaces by index. However, keep in mind that
392 // niri is a dynamic workspace system, so these commands are kind of
393 // "best effort". Trying to refer to a workspace index bigger than
394 // the current workspace count will instead refer to the bottommost
395 // (empty) workspace.
396 //
397 // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
398 // will all refer to the 3rd workspace.
399 Mod+1 { focus-workspace 1; }
400 Mod+2 { focus-workspace 2; }
401 Mod+3 { focus-workspace 3; }
402 Mod+4 { focus-workspace 4; }
403 Mod+5 { focus-workspace 5; }
404 Mod+6 { focus-workspace 6; }
405 Mod+7 { focus-workspace 7; }
406 Mod+8 { focus-workspace 8; }
407 Mod+9 { focus-workspace 9; }
408 Mod+Ctrl+1 { move-column-to-workspace 1; }
409 Mod+Ctrl+2 { move-column-to-workspace 2; }
410 Mod+Ctrl+3 { move-column-to-workspace 3; }
411 Mod+Ctrl+4 { move-column-to-workspace 4; }
412 Mod+Ctrl+5 { move-column-to-workspace 5; }
413 Mod+Ctrl+6 { move-column-to-workspace 6; }
414 Mod+Ctrl+7 { move-column-to-workspace 7; }
415 Mod+Ctrl+8 { move-column-to-workspace 8; }
416 Mod+Ctrl+9 { move-column-to-workspace 9; }
417
418 // Alternatively, there are commands to move just a single window:
419 // Mod+Ctrl+1 { move-window-to-workspace 1; }
420
421 // Switches focus between the current and the previous workspace.
422 // Mod+Tab { focus-workspace-previous; }
423
424 Mod+Comma { consume-window-into-column; }
425 Mod+Period { expel-window-from-column; }
426
427 // There are also commands that consume or expel a single window to the side.
428 // Mod+BracketLeft { consume-or-expel-window-left; }
429 // Mod+BracketRight { consume-or-expel-window-right; }
430
431 Mod+R { switch-preset-column-width; }
432 Mod+Shift+R { reset-window-height; }
433 Mod+F { maximize-column; }
434 Mod+Shift+F { fullscreen-window; }
435 Mod+C { center-column; }
436
437 // Finer width adjustments.
438 // This command can also:
439 // * set width in pixels: "1000"
440 // * adjust width in pixels: "-5" or "+5"
441 // * set width as a percentage of screen width: "25%"
442 // * adjust width as a percentage of screen width: "-10%" or "+10%"
443 // Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
444 // set-column-width "100" will make the column occupy 200 physical screen pixels.
445 Mod+G { set-column-width "+33.333%"; }
446 Mod+Shift+G { set-column-width "-33.333%"; }
447
448 // Finer height adjustments when in column with other windows.
449 Mod+Shift+Minus { set-window-height "-10%"; }
450 Mod+Shift+Equal { set-window-height "+10%"; }
451
452 // Actions to switch layouts.
453 // Note: if you uncomment these, make sure you do NOT have
454 // a matching layout switch hotkey configured in xkb options above.
455 // Having both at once on the same hotkey will break the switching,
456 // since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
457 // Mod+Space { switch-layout "next"; }
458 // Mod+Shift+Space { switch-layout "prev"; }
459
460 Print { screenshot; }
461 Ctrl+Print { screenshot-screen; }
462 Alt+Print { screenshot-window; }
463
464 // The quit action will show a confirmation dialog to avoid accidental exits.
465 Mod+Shift+Q { quit; }
466
467 // Powers off the monitors. To turn them back on, do any input like
468 // moving the mouse or pressing any other key.
469 Mod+Shift+P { power-off-monitors; }
470}
diff --git a/hosts/myrtle/configuration.nix b/hosts/myrtle/configuration.nix
index afec6b7..1f9dc21 100644
--- a/hosts/myrtle/configuration.nix
+++ b/hosts/myrtle/configuration.nix
@@ -94,7 +94,6 @@
94 }; 94 };
95 95
96 hardware = { 96 hardware = {
97 opengl.driSupport = true;
98 bluetooth = { 97 bluetooth = {
99 enable = true; 98 enable = true;
100 powerOnBoot = true; 99 powerOnBoot = true;
@@ -128,12 +127,12 @@
128 }; 127 };
129 128
130 services = { 129 services = {
130 libinput.enable = true;
131 xserver = { 131 xserver = {
132 enable = true; 132 enable = true;
133 xkb.layout = "us"; 133 xkb.layout = "us";
134 videoDrivers = [ "nvidia" ]; 134 videoDrivers = [ "nvidia" ];
135 displayManager.startx.enable = true; 135 displayManager.startx.enable = true;
136 libinput.enable = true;
137 dpi = 192; 136 dpi = 192;
138 screenSection = '' 137 screenSection = ''
139 Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}" 138 Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
@@ -203,7 +202,7 @@
203 ''; 202 '';
204 203
205 virtualisation.docker.enable = true; 204 virtualisation.docker.enable = true;
206 virtualisation.virtualbox.host.enable = true; 205 virtualisation.virtualbox.host.enable = false;
207 users.extraGroups.vboxusers.members = [ "np" ]; 206 users.extraGroups.vboxusers.members = [ "np" ];
208 207
209 security.sudo = { 208 security.sudo = {
@@ -247,9 +246,9 @@
247 }; 246 };
248 247
249 nix = { 248 nix = {
250 package = pkgs.nixUnstable; 249 package = pkgs.nixVersions.latest;
251 extraOptions = '' 250 extraOptions = ''
252 experimental-features = nix-command flakes repl-flake 251 experimental-features = nix-command flakes
253 warn-dirty = false 252 warn-dirty = false
254 keep-outputs = false 253 keep-outputs = false
255 keep-derivations = false 254 keep-derivations = false
diff --git a/hosts/myrtle/home.nix b/hosts/myrtle/home.nix
new file mode 100644
index 0000000..2529b3e
--- /dev/null
+++ b/hosts/myrtle/home.nix
@@ -0,0 +1,133 @@
1{ config
2, pkgs
3, theme
4, self
5, ...
6}:
7
8{
9
10 imports = [
11 ../../programs
12 ../../services
13 ../../x
14 # ./mail.nix
15 ];
16
17 home.stateVersion = "22.11";
18 home.username = "np";
19 home.homeDirectory = "/home/np";
20 home.extraOutputsToInstall = [ "man" ];
21 home.packages = with pkgs; [
22
23 # essentials
24 vim
25 weechat
26 firefox
27 qutebrowser
28 unzip
29 tmux
30 xclip
31 ripgrep
32 miniserve
33 pfetch
34 st
35 cmus
36 tree
37 neomutt
38 w3m
39 noto-fonts-emoji
40 fd
41 du-dust
42 jq
43 libnotify
44 inotify-tools
45 pavucontrol
46 bc
47 signal-desktop
48 killall
49 httpie
50 thunderbird
51 calibre
52 gh
53 sonixd
54
55 # gaming
56 mgba
57
58 # sync
59 rtorrent
60 lftp
61 wget
62 curl
63
64 # graphics
65 krita
66 sxiv
67 imagemagick
68 ffmpeg-full
69 mpv
70 slop
71 maim
72 arandr
73 gimp
74
75 # graphics debug
76 cudatoolkit
77 pciutils
78
79 # monitoring
80 s-tui
81 nvtopPackages.full
82 lshw
83 stress
84 powertop
85
86 # input
87 xinput_calibrator
88 libinput
89
90 # meta
91 nixpkgs-review
92 nixpkgs-fmt
93 nix-prefetch-scripts
94
95 # work
96 slack
97 zoom-us
98 awscli2
99 kubectl
100
101 ] ++ (import ../../scripts { inherit pkgs; });
102
103 home.pointerCursor = {
104 name = "Vanilla-DMZ";
105 package = pkgs.vanilla-dmz;
106 x11.enable = true;
107 };
108
109 xdg = {
110 userDirs = {
111 enable = true;
112 desktop = "\$HOME/desktop";
113 documents = "\$HOME/docs";
114 download = "\$HOME/dloads";
115 music = "\$HOME/music";
116 pictures = "\$HOME/pics";
117 videos = "\$HOME/vids";
118 };
119 };
120
121 xsession = {
122 enable = true;
123 windowManager.command = "2bwm";
124 initExtra = ''
125 ${pkgs.hsetroot}/bin/hsetroot -solid "${theme.base00}"
126 xrdb -load $HOME/.Xresources
127 ${pkgs.picom}/bin/picom &
128 xrandr --setprovideroutputsource modesetting NVIDIA-0
129 xrandr --auto
130 '';
131 };
132
133}
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
3SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2fef", TAG+="uaccess"
4### ATmega32U2
5SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", TAG+="uaccess"
6### ATmega16U4
7SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff3", TAG+="uaccess"
8### ATmega32U4
9SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", TAG+="uaccess"
10### AT90USB64
11SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff9", TAG+="uaccess"
12### AT90USB162
13SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffa", TAG+="uaccess"
14### AT90USB128
15SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", TAG+="uaccess"
16
17# Input Club
18SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", ATTRS{idProduct}=="b007", TAG+="uaccess"
19
20# STM32duino
21SUBSYSTEMS=="usb", ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="0003", TAG+="uaccess"
22# STM32 DFU
23SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", TAG+="uaccess"
24
25# BootloadHID
26SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05df", TAG+="uaccess"
27
28# USBAspLoader
29SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uaccess"
30
31# ModemManager should ignore the following devices
32# Atmel SAM-BA (Massdrop)
33SUBSYSTEMS=="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
38SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
39## Spark Fun Electronics
40### Pro Micro 3V3/8MHz
41SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
42### Pro Micro 5V/16MHz
43SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9205", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
44### LilyPad 3V3/8MHz (and some Pro Micro clones)
45SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9207", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
46## Pololu Electronics
47### A-Star 32U4
48SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ffb", ATTRS{idProduct}=="0101", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
49## Arduino SA
50### Leonardo
51SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
52### Micro
53SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
54## Adafruit Industries LLC
55### Feather 32U4
56SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000c", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
57### ItsyBitsy 32U4 3V3/8MHz
58SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000d", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
59### ItsyBitsy 32U4 5V/16MHz
60SUBSYSTEMS=="usb", ATTRS{idVendor}=="239a", ATTRS{idProduct}=="000e", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
61## dog hunter AG
62### Leonardo
63SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0036", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
64### Micro
65SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
66
67# hid_listen
68KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl"
69
70# hid bootloaders
71## QMK HID
72SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2067", TAG+="uaccess"
73## PJRC's HalfKay
74SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0478", TAG+="uaccess"
diff --git a/patches/2bwm/nerd-patch.diff b/patches/2bwm/nerd-patch.diff
index 9e315be..cdb6a00 100644
--- a/patches/2bwm/nerd-patch.diff
+++ b/patches/2bwm/nerd-patch.diff
@@ -8,7 +8,7 @@ index 0985d2e..baa77f8 100644
8 ///--Menus and Programs---/// 8 ///--Menus and Programs---///
9-static const char *menucmd[] = { "", NULL }; 9-static const char *menucmd[] = { "", NULL };
10+// static const char *menucmd[] = { "", NULL }; 10+// static const char *menucmd[] = { "", NULL };
11+static const char *terminal[] = { "st", NULL }; 11+static const char *terminal[] = { "alacritty", NULL };
12+static const char *rofi_run[] = { "rofi", "-show", "combi" }; 12+static const char *rofi_run[] = { "rofi", "-show", "combi" };
13+static const char *rofi_window[] = { "rofi", "-show", "window" }; 13+static const char *rofi_window[] = { "rofi", "-show", "window" };
14 ///--Custom foo---/// 14 ///--Custom foo---///
diff --git a/programs/alacritty.nix b/programs/alacritty.nix
new file mode 100644
index 0000000..280c667
--- /dev/null
+++ b/programs/alacritty.nix
@@ -0,0 +1,63 @@
1{ config
2, pkgs
3, lib
4, theme
5, font
6, ...
7}:
8let
9
10 fontConfig = {
11 normal = { family = "${font.name}"; style = "Regular"; };
12 bold = { family = "${font.name}"; style = "Bold"; };
13 italic = { family = "${font.name}"; style = "Italic"; };
14 size = 10.0;
15 };
16in
17{
18 programs.alacritty = {
19 enable = true;
20 settings = {
21 env = {
22 TERM = "xterm-256color";
23 };
24 window = {
25 padding.x = 20;
26 padding.y = 20;
27 dynamic_padding = true;
28 decorations = "None";
29 };
30
31 font = fontConfig;
32
33 colors = {
34 primary = {
35 background = "${theme.base00}";
36 foreground = "${theme.base05}";
37 };
38 normal = {
39 black = "${theme.base00}";
40 red = "${theme.base08}";
41 green = "${theme.base0B}";
42 yellow = "${theme.base0A}";
43 blue = "${theme.base0D}";
44 magenta = "${theme.base0E}";
45 cyan = "${theme.base0C}";
46 white = "${theme.base05}";
47 };
48 bright = {
49 black = "${theme.base03}";
50 red = "${theme.base09}";
51 green = "${theme.base01}";
52 yellow = "${theme.base02}";
53 blue = "${theme.base04}";
54 magenta = "${theme.base06}";
55 cyan = "${theme.base0F}";
56 white = "${theme.base07}";
57 };
58 };
59
60 };
61 };
62}
63
diff --git a/programs/atuin.nix b/programs/atuin.nix
new file mode 100644
index 0000000..39e5d89
--- /dev/null
+++ b/programs/atuin.nix
@@ -0,0 +1,20 @@
1{
2 programs.atuin = {
3 enable = true;
4 enableBashIntegration = true;
5 flags = [
6 "--disable-up-arrow"
7 ];
8 settings = {
9 invert = true;
10 history_format = "{command}";
11 theme.name = "minimal";
12 style = "compact";
13 inline_height = 15;
14 prefers_reduced_motion = true;
15 show_help = false;
16 show_tabs = false;
17 enter_accept = true;
18 };
19 };
20}
diff --git a/programs/bash.nix b/programs/bash.nix
index 7d3c25e..d4a52f2 100644
--- a/programs/bash.nix
+++ b/programs/bash.nix
@@ -53,27 +53,15 @@
53 ]; 53 ];
54 54
55 sessionVariables = { 55 sessionVariables = {
56 56 TERM = "alacritty";
57 PF_INFO = "ascii title os kernel uptime pkgs shell";
58 PF_SEP = " ";
59 PF_COL1 = 7;
60 PF_COL2 = 7;
61 PF_COL3 = 6;
62 PF_ALIGN = "9";
63 PF_ASCII = "nixos";
64
65 _JAVA_AWT_WM_NONREPARENTING = 1;
66
67 TERM = "xterm-256color-italic";
68 EDITOR = "nvim"; 57 EDITOR = "nvim";
69 MANPAGER = "nvim +Man!"; 58 MANPAGER = "nvim +Man!";
70 GPG_TTY = "\$(tty)"; 59 GPG_TTY = "\$(tty)";
71
72 }; 60 };
73 61
74 initExtra = '' 62 initExtra = ''
75 export PATH=$PATH:"$HOME/scripts" 63 export PATH=$PATH:"$HOME/scripts"
76 export PROMPT_COMMAND="tmux refresh-client -S > /dev/null"; 64 export PROMPT_COMMAND="tmux refresh-client -S &> /dev/null";
77 export PS1="\n\001\e[0;36m\002λ\001\e[0m\002 "; 65 export PS1="\n\001\e[0;36m\002λ\001\e[0m\002 ";
78 export PS2="> "; 66 export PS2="> ";
79 67
diff --git a/programs/default.nix b/programs/default.nix
index 70ded22..d7911cc 100644
--- a/programs/default.nix
+++ b/programs/default.nix
@@ -8,6 +8,7 @@
8{ 8{
9 9
10 imports = [ 10 imports = [
11 ./atuin.nix
11 ./bash.nix 12 ./bash.nix
12 ./chromium.nix 13 ./chromium.nix
13 ./feh.nix 14 ./feh.nix
@@ -16,9 +17,11 @@
16 ./htop.nix 17 ./htop.nix
17 ./neovim.nix 18 ./neovim.nix
18 ./readline.nix 19 ./readline.nix
20 ./rofi.nix
21 ./alacritty.nix
19 ./tmux.nix 22 ./tmux.nix
20 ./zathura.nix 23 ./zathura.nix
21 ./rofi.nix 24 ./fuzzel.nix
22 ]; 25 ];
23 26
24 programs = { 27 programs = {
@@ -48,5 +51,22 @@
48 }; 51 };
49 gpg.enable = true; 52 gpg.enable = true;
50 info.enable = true; 53 info.enable = true;
54 broot = {
55 enable = true;
56 enableBashIntegration = true;
57 settings = {
58 imports = [
59 "native-16.hjson"
60 ];
61 verbs = [
62 {
63 key = "enter";
64 working_dir = "{root}";
65 execution = ''$EDITOR +{line} {file}'';
66 leave_broot = true;
67 }
68 ];
69 };
70 };
51 }; 71 };
52} 72}
diff --git a/programs/fuzzel.nix b/programs/fuzzel.nix
new file mode 100644
index 0000000..8a87911
--- /dev/null
+++ b/programs/fuzzel.nix
@@ -0,0 +1,42 @@
1{ config
2, pkgs
3, theme
4, font
5, ...
6}:
7
8with theme;
9let
10 fuzzelColor = themeColor: (builtins.replaceStrings [ "#" ] [ "" ] themeColor) + "ff";
11in
12{
13 programs.fuzzel = {
14 enable = true;
15 settings = {
16 main = {
17 font = "${font.name}:size=12";
18 prompt = "";
19 anchor = "top-left";
20 icons-enabled = "no";
21 fields = "filename,exec,name,generic";
22 horizontal-pad = 12;
23 vertical-pad = 12;
24 };
25 colors = {
26 background = "${fuzzelColor theme.base00}";
27 text = "${fuzzelColor theme.base02}";
28 match = "${fuzzelColor theme.base0C}";
29 selection = "${fuzzelColor theme.base00}";
30 selection-text = "${fuzzelColor theme.base05}";
31 selection-match = "${fuzzelColor theme.base0C}";
32 border = "${fuzzelColor theme.base02}";
33 };
34 border = {
35 width = 2;
36 radius = 0;
37 };
38 };
39 };
40}
41
42
diff --git a/programs/fzf.nix b/programs/fzf.nix
index 92ee4d0..c1e6bdb 100644
--- a/programs/fzf.nix
+++ b/programs/fzf.nix
@@ -8,6 +8,8 @@
8 "--color bw" 8 "--color bw"
9 "--no-scrollbar" 9 "--no-scrollbar"
10 "--no-separator" 10 "--no-separator"
11 "--no-unicode"
12 "--pointer '>'"
11 ]; 13 ];
12 defaultCommand = "rg -L --files"; 14 defaultCommand = "rg -L --files";
13 changeDirWidgetCommand = "fd --type d"; 15 changeDirWidgetCommand = "fd --type d";
diff --git a/programs/git.nix b/programs/git.nix
index e4b5e0f..d4fac67 100644
--- a/programs/git.nix
+++ b/programs/git.nix
@@ -19,7 +19,13 @@ with theme;
19 syntax-theme = "none"; 19 syntax-theme = "none";
20 zero-style = "8"; 20 zero-style = "8";
21 navigate = "true"; 21 navigate = "true";
22 line-numbers = "true";
22 keep-plus-minus-markers = "true"; 23 keep-plus-minus-markers = "true";
24 line-numbers-zero-style = "8";
25 line-numbers-left-style = "8";
26 line-numbers-right-style = "8";
27 line-numbers-minus-style = "${base08}";
28 line-numbers-plus-style = "${base0B}";
23 decorations = { 29 decorations = {
24 file-decoration-style = "none"; 30 file-decoration-style = "none";
25 whitespace-error-style = "22 reverse"; 31 whitespace-error-style = "22 reverse";
@@ -27,7 +33,7 @@ with theme;
27 minus-emph-style = "${base08} bold"; 33 minus-emph-style = "${base08} bold";
28 plus-style = "${base0B}"; 34 plus-style = "${base0B}";
29 plus-emph-style = "${base0B} bold"; 35 plus-emph-style = "${base0B} bold";
30 file-style = "7 italic"; 36 file-style = "7 bold";
31 hunk-header-style = "7"; 37 hunk-header-style = "7";
32 hunk-header-decoration-style = "8 ul"; 38 hunk-header-decoration-style = "8 ul";
33 }; 39 };
@@ -39,11 +45,6 @@ with theme;
39 }; 45 };
40 }; 46 };
41 }; 47 };
42 # difftastic = {
43 # enable = true;
44 # background = "dark";
45 # display = "inline";
46 # };
47 aliases = { 48 aliases = {
48 co = "checkout"; 49 co = "checkout";
49 rb = "rebase"; 50 rb = "rebase";
@@ -67,6 +68,7 @@ with theme;
67 enabled = true; 68 enabled = true;
68 autoUpdate = true; 69 autoUpdate = true;
69 }; 70 };
71 merge.conflictstyle = "diff3";
70 }; 72 };
71 }; 73 };
72} 74}
diff --git a/programs/init.vim b/programs/init.vim
index c62f419..e7a70c1 100644
--- a/programs/init.vim
+++ b/programs/init.vim
@@ -55,6 +55,8 @@ set dir=/tmp
55 55
56syntax on 56syntax on
57 57
58set nocursorline
59set notermguicolors
58set omnifunc=syntaxcomplete#Complete 60set omnifunc=syntaxcomplete#Complete
59set completefunc=LanguageClient#complete 61set completefunc=LanguageClient#complete
60set list 62set list
@@ -76,6 +78,7 @@ set path+=**
76set backspace=indent,eol,start 78set backspace=indent,eol,start
77set hidden 79set hidden
78set wildmenu 80set wildmenu
81set pumheight=8
79set complete=.,w,b,i,u,t, 82set complete=.,w,b,i,u,t,
80set background=dark 83set background=dark
81set mouse=a 84set mouse=a
@@ -83,7 +86,7 @@ set conceallevel=0
83set nonumber 86set nonumber
84set grepprg=rg\ --vimgrep\ --no-heading 87set grepprg=rg\ --vimgrep\ --no-heading
85set grepformat=%f:%l:%c:%m,%f:%l:%m 88set grepformat=%f:%l:%c:%m,%f:%l:%m
86set cmdheight=2 89set cmdheight=1
87set shortmess+=c 90set shortmess+=c
88set updatetime=300 91set updatetime=300
89set signcolumn=yes 92set signcolumn=yes
@@ -97,7 +100,7 @@ let g:netrw_banner=0
97let g:netrw_browsex_viewer="xdg-open" 100let g:netrw_browsex_viewer="xdg-open"
98let g:netrw_winsize=30 101let g:netrw_winsize=30
99 102
100colorscheme plain 103colorscheme agila
101 104
102set shiftwidth=4 " indent = 4 spaces 105set shiftwidth=4 " indent = 4 spaces
103set expandtab 106set expandtab
@@ -129,35 +132,25 @@ cab bfd bufdo
129" man pages 132" man pages
130let g:ft_man_open_mode = 'tab' 133let g:ft_man_open_mode = 'tab'
131 134
132let g:gitgutter_override_sign_column_highlight = 0
133let g:gitgutter_sign_added = '+'
134let g:gitgutter_sign_modified = '~'
135let g:gitgutter_sign_removed = '-'
136let g:gitgutter_sign_removed_first_line = '-'
137let g:gitgutter_sign_modified_removed = '~'
138
139let g:fzf_colors = 135let g:fzf_colors =
140 \ { 'fg': ['fg', 'Noise'], 136 \ { 'fg': ['fg', 'Normal'],
141 \ 'bg': ['bg', 'Noise'], 137 \ 'bg': ['bg', 'Normal'],
142 \ 'hl': ['fg', 'Statement'], 138 \ 'hl': ['fg', 'Normal'],
143 \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], 139 \ 'fg+': ['fg', 'StatusLine'],
144 \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], 140 \ 'bg+': ['bg', 'Normal'],
145 \ 'hl+': ['fg', 'Statement'], 141 \ 'hl+': ['fg', 'Normal'],
142 \ 'gutter': ['bg', 'Normal'],
146 \ 'info': ['fg', 'PreProc'], 143 \ 'info': ['fg', 'PreProc'],
147 \ 'border': ['fg', 'Ignore'], 144 \ 'border': ['fg', 'Ignore'],
148 \ 'prompt': ['fg', 'Conditional'], 145 \ 'prompt': ['fg', 'Conditional'],
149 \ 'pointer': ['fg', 'Exception'], 146 \ 'pointer': ['fg', 'Directory'],
150 \ 'marker': ['fg', 'Keyword'], 147 \ 'marker': ['fg', 'Keyword'],
151 \ 'spinner': ['fg', 'Label'], 148 \ 'spinner': ['fg', 'Label'],
152 \ 'header': ['fg', 'Comment'] } 149 \ 'header': ['fg', 'Comment'] }
153let g:fzf_layout = { 'down': '40%' } 150let g:fzf_layout = { 'down': '40%' }
154let g:fzf_preview_window = [] 151let g:fzf_preview_window = []
155 152
156highlight GitGutterAdd ctermfg=8 153let g:rustfmt_autosave = 0
157highlight GitGutterChange ctermfg=8
158highlight GitGutterDelete ctermfg=8
159
160let g:rustfmt_autosave = 1
161 154
162let g:latex_view_general_viewer = "zathura" 155let g:latex_view_general_viewer = "zathura"
163let g:vimtex_view_method = "zathura" 156let g:vimtex_view_method = "zathura"
@@ -177,4 +170,5 @@ require 'lsp'
177require 'treesitter' 170require 'treesitter'
178require 'completions' 171require 'completions'
179require 'leap' 172require 'leap'
173require 'clipboard'
180EOF 174EOF
diff --git a/programs/neovim.nix b/programs/neovim.nix
index 08a1ada..6a09ba4 100644
--- a/programs/neovim.nix
+++ b/programs/neovim.nix
@@ -42,7 +42,9 @@
42 # syntax 42 # syntax
43 rust-vim 43 rust-vim
44 haskell-vim 44 haskell-vim
45 typescript-vim
45 vim-nix 46 vim-nix
47 vim-javascript
46 48
47 # handy 49 # handy
48 tabular 50 tabular
diff --git a/programs/readline.nix b/programs/readline.nix
index 8afdd82..c4d5046 100644
--- a/programs/readline.nix
+++ b/programs/readline.nix
@@ -8,6 +8,7 @@
8 enable = true; 8 enable = true;
9 bindings = { 9 bindings = {
10 "\\C-o" = ''"tmux-fzf\n"''; 10 "\\C-o" = ''"tmux-fzf\n"'';
11 "\\C-b" = ''"br\n"'';
11 "\\t" = "menu-complete"; 12 "\\t" = "menu-complete";
12 "\\e[Z" = "menu-complete-backward"; 13 "\\e[Z" = "menu-complete-backward";
13 }; 14 };
diff --git a/programs/rofi.nix b/programs/rofi.nix
index 8ce77bf..b6105fc 100644
--- a/programs/rofi.nix
+++ b/programs/rofi.nix
@@ -35,17 +35,15 @@ let
35 35
36 inputbar.children = [ "entry" ]; 36 inputbar.children = [ "entry" ];
37 37
38 element.padding = 10;
39 entry = { 38 entry = {
40 padding = 10;
41 placeholder = "type to filter"; 39 placeholder = "type to filter";
42 }; 40 };
43 listview.border = 0; 41 listview.border = 0;
44 scrollbar.handle-width = 0; 42 scrollbar.handle-width = 0;
45 window = { 43 window = {
46 padding = 40; 44 padding = 40;
47 width = 800; 45 width = 600;
48 height = 600; 46 height = 400;
49 border = mkLiteral "3px solid"; 47 border = mkLiteral "3px solid";
50 border-color = mkLiteral theme.base01; 48 border-color = mkLiteral theme.base01;
51 }; 49 };
@@ -53,11 +51,12 @@ let
53in 51in
54{ 52{
55 programs.rofi = { 53 programs.rofi = {
54 package = pkgs.rofi-wayland;
56 enable = true; 55 enable = true;
57 font = "${font.name} 21"; 56 font = "${font.name} 12";
58 location = "top-left"; 57 location = "center";
59 xoffset = 20; 58 # xoffset = 40;
60 yoffset = 20; 59 # yoffset = 40;
61 cycle = true; 60 cycle = true;
62 theme = rofi-theme; 61 theme = rofi-theme;
63 extraConfig = { 62 extraConfig = {
@@ -65,8 +64,8 @@ in
65 combi-modes = mkLiteral "[ window, run ]"; 64 combi-modes = mkLiteral "[ window, run ]";
66 # window = mkLiteral ''{ display-name: "[w]"; }''; 65 # window = mkLiteral ''{ display-name: "[w]"; }'';
67 # run = mkLiteral ''{ display-name: "[r]"; }''; 66 # run = mkLiteral ''{ display-name: "[r]"; }'';
68 kb-clear-line = "Control+c"; 67 # kb-clear-line = "Control+u";
69 kb-remove-word-back = "Control+w"; 68 # kb-remove-word-back = "Control+w";
70 }; 69 };
71 }; 70 };
72} 71}
diff --git a/programs/st/config.h b/programs/st/config.h
index c9fca58..d6402f9 100644
--- a/programs/st/config.h
+++ b/programs/st/config.h
@@ -27,7 +27,7 @@ char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
27char *vtiden = "\033[?6c"; 27char *vtiden = "\033[?6c";
28 28
29/* Kerning / character bounding-box multipliers */ 29/* Kerning / character bounding-box multipliers */
30static float cwscale = 0.9; 30static float cwscale = 1.0;
31static float chscale = 1.0; 31static float chscale = 1.0;
32 32
33/* 33/*
@@ -46,7 +46,7 @@ int allowaltscreen = 1;
46 46
47/* allow certain non-interactive (insecure) window operations such as: 47/* allow certain non-interactive (insecure) window operations such as:
48 setting the clipboard text */ 48 setting the clipboard text */
49int allowwindowops = 0; 49int allowwindowops = 1;
50 50
51/* 51/*
52 * draw latency range in ms - from new content/keypress/etc until drawing. 52 * draw latency range in ms - from new content/keypress/etc until drawing.
diff --git a/programs/tmux.nix b/programs/tmux.nix
index 43778dd..10cbf5f 100644
--- a/programs/tmux.nix
+++ b/programs/tmux.nix
@@ -28,12 +28,15 @@ let
28 date-bst = date-tz "Europe/London"; 28 date-bst = date-tz "Europe/London";
29 date-hel = date-tz "Europe/Helsinki"; 29 date-hel = date-tz "Europe/Helsinki";
30 30
31 copy = "${pkgs.wl-clipboard-rs}/bin/wl-copy";
32 paste = "${pkgs.wl-clipboard-rs}/bin/wl-paste";
33
31 # plugins 34 # plugins
32 thumbs = { 35 thumbs = {
33 plugin = pkgs.tmuxPlugins.tmux-thumbs; 36 plugin = pkgs.tmuxPlugins.tmux-thumbs;
34 extraConfig = '' 37 extraConfig = ''
35 set -g @thumbs-key F 38 set -g @thumbs-key F
36 set -g @thumbs-command 'echo -n {} | xclip -i -sel p -f | xclip -i -sel c' 39 set -g @thumbs-command 'echo -n {} | ${copy}'
37 set -g @thumbs-fg-color white 40 set -g @thumbs-fg-color white
38 set -g @thumbs-hint-bg-color yellow 41 set -g @thumbs-hint-bg-color yellow
39 set -g @thumbs-hint-fg-color black 42 set -g @thumbs-hint-fg-color black
@@ -65,7 +68,7 @@ in
65 plugins = [ thumbs ]; 68 plugins = [ thumbs ];
66 prefix = "C-t"; 69 prefix = "C-t";
67 keyMode = "vi"; 70 keyMode = "vi";
68 terminal = "xterm-256color-italic"; 71 terminal = "alacritty";
69 extraConfig = '' 72 extraConfig = ''
70 bind r source-file ~/.config/tmux/tmux.conf 73 bind r source-file ~/.config/tmux/tmux.conf
71 74
@@ -112,9 +115,10 @@ in
112 bind-key -r ">" swap-window -d -t +1 115 bind-key -r ">" swap-window -d -t +1
113 116
114 bind-key -T copy-mode-vi v send-keys -X begin-selection 117 bind-key -T copy-mode-vi v send-keys -X begin-selection
115 bind-key -T copy-mode-vi y send-keys -X copy-pipe "xclip -i -sel p -f | xclip -i -sel c " 118 bind-key -T copy-mode-vi y send-keys -X copy-pipe "${copy}"
116 bind-key -T copy-mode-vi r send-keys -X rectangle-toggle 119 bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
117 bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "xclip -i -sel p -f | xclip -i -sel c " 120 bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "${copy}"
121 set -s set-clipboard on
118 bind P paste-buffer 122 bind P paste-buffer
119 123
120 set-window-option -g allow-rename off 124 set-window-option -g allow-rename off
@@ -138,7 +142,7 @@ in
138 # status left 142 # status left
139 set -g status-left-length 70 143 set -g status-left-length 70
140 set -g status-left "#[fg=colour7]#(bat -q) " 144 set -g status-left "#[fg=colour7]#(bat -q) "
141 set -ag status-left "#[fg=colour15]#(${cmus-np}/bin/cmus-np) #[fg=colour8]#(${cmus-status}/bin/cmus-status)" 145 # set -ag status-left "#[fg=colour15]#(${cmus-np}/bin/cmus-np) #[fg=colour8]#(${cmus-status}/bin/cmus-status)"
142 146
143 # include pwd and branch in pane border 147 # include pwd and branch in pane border
144 set -g pane-border-status top 148 set -g pane-border-status top
diff --git a/scripts/battery.nix b/scripts/battery.nix
index 87b6cff..3aed4f9 100644
--- a/scripts/battery.nix
+++ b/scripts/battery.nix
@@ -17,6 +17,12 @@ pkgs.writeScriptBin name
17 17
18 bat_status="" 18 bat_status=""
19 bat_status=$( cat /sys/class/power_supply/BAT0/capacity ) 19 bat_status=$( cat /sys/class/power_supply/BAT0/capacity )
20
21 if [ -z $bat_status ]; then
22 echo -ne "#[fg=color2]${symbol} #[fg=colour8]$HOSTNAME"
23 exit 0
24 fi
25
20 charging_status=$( cat /sys/class/power_supply/BAT0/status ) 26 charging_status=$( cat /sys/class/power_supply/BAT0/status )
21 27
22 health() { 28 health() {
diff --git a/scripts/default.nix b/scripts/default.nix
index c7a485c..59b1ca5 100644
--- a/scripts/default.nix
+++ b/scripts/default.nix
@@ -64,6 +64,11 @@ let
64 ${pkgs.xorg.xinput}/bin/xinput set-prop "${touchscreen}" --type=float "Coordinate Transformation Matrix" ${portait-transform} 64 ${pkgs.xorg.xinput}/bin/xinput set-prop "${touchscreen}" --type=float "Coordinate Transformation Matrix" ${portait-transform}
65 ${pkgs.xorg.xinput}/bin/xinput set-prop "${stylus}" --type=float "Coordinate Transformation Matrix" ${portait-transform} 65 ${pkgs.xorg.xinput}/bin/xinput set-prop "${stylus}" --type=float "Coordinate Transformation Matrix" ${portait-transform}
66 ''; 66 '';
67 portrait2 = pkgs.writeScriptBin "portrait2" ''
68 ${pkgs.xorg.xrandr}/bin/xrandr -o right
69 ${pkgs.xorg.xinput}/bin/xinput set-prop "${touchscreen}" --type=float "Coordinate Transformation Matrix" ${portait-transform}
70 ${pkgs.xorg.xinput}/bin/xinput set-prop "${stylus}" --type=float "Coordinate Transformation Matrix" ${portait-transform}
71 '';
67 landscape = pkgs.writeScriptBin "landscape" '' 72 landscape = pkgs.writeScriptBin "landscape" ''
68 ${pkgs.xorg.xrandr}/bin/xrandr -o normal 73 ${pkgs.xorg.xrandr}/bin/xrandr -o normal
69 ${pkgs.xorg.xinput}/bin/xinput set-prop "${touchscreen}" --type=float "Coordinate Transformation Matrix" ${landscape-transform} 74 ${pkgs.xorg.xinput}/bin/xinput set-prop "${touchscreen}" --type=float "Coordinate Transformation Matrix" ${landscape-transform}
@@ -82,6 +87,7 @@ in
82 battery 87 battery
83 tmux-fzf 88 tmux-fzf
84 portrait 89 portrait
90 portrait2
85 landscape 91 landscape
86 nvidia-offload 92 nvidia-offload
87 m2m 93 m2m
diff --git a/scripts/up.nix b/scripts/up.nix
index c4f7c7a..0217b6b 100644
--- a/scripts/up.nix
+++ b/scripts/up.nix
@@ -13,10 +13,10 @@ pkgs.writeScriptBin name
13 if [ -f "$1" ]; then 13 if [ -f "$1" ]; then
14 ext="''${1##*.}" 14 ext="''${1##*.}"
15 id="$id.$ext" 15 id="$id.$ext"
16 scp "$1" ferrn:~/www/nerd/uploads/"$id" 16 scp "$1" kombu:/var/www/uploads/"$id"
17 echo "https://u.peppe.rs/$id" 17 echo "https://cdn.oppi.li/$id"
18 echo "https://u.peppe.rs/$id" | ${xclip} -selection clipboard 18 echo "https://cdn.oppi.li/$id" | ${xclip} -selection clipboard
19 echo "https://u.peppe.rs/$id" | ${xclip} -i 19 echo "https://cdn.oppi.li/$id" | ${xclip} -i
20 else 20 else
21 echo "file does not exist" 21 echo "file does not exist"
22 fi 22 fi
diff --git a/services/default.nix b/services/default.nix
index bef7c85..a45f53a 100644
--- a/services/default.nix
+++ b/services/default.nix
@@ -1,6 +1,7 @@
1{ config 1{ config
2, pkgs 2, pkgs
3, theme 3, theme
4, font
4, ... 5, ...
5}: 6}:
6 7
@@ -24,5 +25,4 @@
24 pinentryPackage = pkgs.pinentry-tty; 25 pinentryPackage = pkgs.pinentry-tty;
25 }; 26 };
26 }; 27 };
27
28} 28}
diff --git a/services/sxhkd.nix b/services/sxhkd.nix
index d8678af..fab1316 100644
--- a/services/sxhkd.nix
+++ b/services/sxhkd.nix
@@ -10,8 +10,8 @@ let
10 ${pkgs.libnotify}/bin/notify-send ${text} -h int:value:${value} -h string:synchronous:volume -h string:hlcolor:"${theme.base0C}" 10 ${pkgs.libnotify}/bin/notify-send ${text} -h int:value:${value} -h string:synchronous:volume -h string:hlcolor:"${theme.base0C}"
11 ''; 11 '';
12 volume = pkgs.writeScriptBin "volume" '' 12 volume = pkgs.writeScriptBin "volume" ''
13 ${pkgs.alsaUtils}/bin/amixer $@ 13 ${pkgs.alsa-utils}/bin/amixer $@
14 v=$(${pkgs.alsaUtils}/bin/amixer sget Master | ${pkgs.gawk}/bin/awk -F"[][%]" '/Left:/ {print $2}') 14 v=$(${pkgs.alsa-utils}/bin/amixer sget Master | ${pkgs.gawk}/bin/awk -F"[][%]" '/Left:/ {print $2}')
15 ${progress "volume" "$v"} 15 ${progress "volume" "$v"}
16 ''; 16 '';
17 17
@@ -19,14 +19,21 @@ in
19{ 19{
20 services.sxhkd = { 20 services.sxhkd = {
21 enable = true; 21 enable = true;
22 keybindings = { 22 keybindings =
23 "super + slash" = "${pkgs.light}/bin/light -A 2"; 23 let
24 "super + shift + slash" = "${pkgs.light}/bin/light -U 2"; 24 vol_up = "${volume}/bin/volume sset Master 2%+";
25 "super + semicolon" = "${volume}/bin/volume sset Master 2%+"; 25 vol_down = "${volume}/bin/volume sset Master 2%-";
26 "super + shift + semicolon" = "${volume}/bin/volume sset Master 2%-"; 26 in
27 "super + ctrl + space" = "${pkgs.dunst}/bin/dunstctl close"; 27 {
28 "super + shift + space" = "${pkgs.dunst}/bin/dunstctl history-pop"; 28 "super + slash" = "${pkgs.light}/bin/light -A 2";
29 "super + ctrl + shift + space" = "${pkgs.dunst}/bin/dunstctl close-all"; 29 "super + shift + slash" = "${pkgs.light}/bin/light -U 2";
30 }; 30 "super + semicolon" = vol_up;
31 "super + shift + semicolon" = vol_down;
32 "XF86AudioRaiseVolume" = vol_up;
33 "XF86AudioLowerVolume" = vol_down;
34 "super + ctrl + space" = "${pkgs.dunst}/bin/dunstctl close";
35 "super + shift + space" = "${pkgs.dunst}/bin/dunstctl history-pop";
36 "super + ctrl + shift + space" = "${pkgs.dunst}/bin/dunstctl close-all";
37 };
31 }; 38 };
32} 39}
diff --git a/theme/default.nix b/theme/default.nix
index b3af086..7e1108b 100644
--- a/theme/default.nix
+++ b/theme/default.nix
@@ -2,5 +2,7 @@ let
2 day = import ./day.nix; 2 day = import ./day.nix;
3 night = import ./night.nix; 3 night = import ./night.nix;
4 gruvbox = import ./gruvbox.nix; 4 gruvbox = import ./gruvbox.nix;
5 tomorrow-night = import ./tomorrow-night.nix;
6 material-darker = import ./material-darker.nix;
5in 7in
6night 8material-darker
diff --git a/theme/material-darker.nix b/theme/material-darker.nix
new file mode 100644
index 0000000..ded97fe
--- /dev/null
+++ b/theme/material-darker.nix
@@ -0,0 +1,18 @@
1{
2 base00 = "#111111";
3 base01 = "#202020";
4 base02 = "#242424";
5 base03 = "#393939";
6 base04 = "#4A4A4A";
7 base05 = "#CCCCCC";
8 base06 = "#EEFFFF";
9 base07 = "#FFFFFF";
10 base08 = "#cc6666";
11 base09 = "#de935f";
12 base0A = "#f0c674";
13 base0B = "#b5bd68";
14 base0C = "#8abeb7";
15 base0D = "#81a2be";
16 base0E = "#b294bb";
17 base0F = "#a3685a";
18}
diff --git a/theme/tomorrow-night.nix b/theme/tomorrow-night.nix
new file mode 100644
index 0000000..93552b3
--- /dev/null
+++ b/theme/tomorrow-night.nix
@@ -0,0 +1,18 @@
1{
2 base00 = "#1d1f21";
3 base01 = "#282a2e";
4 base02 = "#373b41";
5 base03 = "#969896";
6 base04 = "#b4b7b4";
7 base05 = "#c5c8c6";
8 base06 = "#e0e0e0";
9 base07 = "#ffffff";
10 base08 = "#cc6666";
11 base09 = "#de935f";
12 base0A = "#f0c674";
13 base0B = "#b5bd68";
14 base0C = "#8abeb7";
15 base0D = "#81a2be";
16 base0E = "#b294bb";
17 base0F = "#a3685a";
18}
diff --git a/x/default.nix b/x/default.nix
index 0b48175..d262ce7 100644
--- a/x/default.nix
+++ b/x/default.nix
@@ -9,6 +9,6 @@
9 ./2bwm.nix 9 ./2bwm.nix
10 ./xft.nix 10 ./xft.nix
11 ./rxvt.nix 11 ./rxvt.nix
12 ./xlock.nix 12 # ./xlock.nix
13 ]; 13 ];
14} 14}
diff --git a/x/rxvt.nix b/x/rxvt.nix
index b5401ab..98f2ab7 100644
--- a/x/rxvt.nix
+++ b/x/rxvt.nix
@@ -31,9 +31,9 @@ with theme;
31 "*color15" = base07; 31 "*color15" = base07;
32 32
33 "*.cursorBlink" = "on"; 33 "*.cursorBlink" = "on";
34 "URxvt.font" = "xft:${font.name}:size=11:style=Medium"; 34 "URxvt.font" = "xft:scientifica:size=11:style=Medium";
35 "URxvt.italicFont" = "xft:${font.name}:size=11:style=Medium"; 35 "URxvt.italicFont" = "xft:scientifica:size=11:style=Medium";
36 "URxvt.boldFont" = "xft:${font.name}:size=11:style=Medium"; 36 "URxvt.boldFont" = "xft:scientifica:size=11:style=Medium";
37 "*font" = "${font.name}:size=11:style=Regular"; 37 "*font" = "${font.name}:size=11:style=Regular";
38 "*italicFont" = "${font.name}:size=11:style=Italic"; 38 "*italicFont" = "${font.name}:size=11:style=Italic";
39 "*boldFont" = "${font.name}:size=11:style=Bold"; 39 "*boldFont" = "${font.name}:size=11:style=Bold";
diff --git a/x/xft.nix b/x/xft.nix
index 32a1957..5d886bb 100644
--- a/x/xft.nix
+++ b/x/xft.nix
@@ -11,6 +11,6 @@
11 "Xft.hintstyle" = "hintslight"; 11 "Xft.hintstyle" = "hintslight";
12 "Xft.hinting" = true; 12 "Xft.hinting" = true;
13 "Xft.rgba" = "rgb"; 13 "Xft.rgba" = "rgb";
14 "Xft.dpi" = 192; 14 "Xft.dpi" = 160;
15 }; 15 };
16} 16}