authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-07-04 21:47:29-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-07-04 21:47:29-07:00
log90fa812e6a8a7032ad4b95f7ba20802b4e1e124e
treee0bc2f7d707106e007a1f1d6cea5975ab938d110
parentac6a00196705a795ac82a59eeacd7eee59587cee
parent680b8090626fbdb0c62d2894c9a61b95286a9c1f

Merge remote-tracking branch 'origin/nats' into chloe


26 files changed, 1048 insertions(+), 1259 deletions(-)

flake.lock+124-542
......@@ -15,11 +15,11 @@
1515 "sf-pro": "sf-pro"
1616 },
1717 "locked": {
18 "lastModified": 1740961576,
19 "narHash": "sha256-9L6d3owtajM72YvUOpK1zYle2nM0BpsuopbF9lm9lJs=",
18 "lastModified": 1748299691,
19 "narHash": "sha256-HMlx5HzeOOhpewq3y9UaSMP9AkhEo+AFJHZIWLQvJGw=",
2020 "owner": "Lyndeno",
2121 "repo": "apple-fonts.nix",
22 "rev": "4df58996ed654f6ce9b71b41c1826484c6870739",
22 "rev": "ec51ae2e8ba89adbb5188c40aa262a7418c48b00",
2323 "type": "github"
2424 },
2525 "original": {
......@@ -28,73 +28,6 @@
2828 "type": "github"
2929 }
3030 },
31 "base16": {
32 "inputs": {
33 "fromYaml": "fromYaml"
34 },
35 "locked": {
36 "lastModified": 1746562888,
37 "narHash": "sha256-YgNJQyB5dQiwavdDFBMNKk1wyS77AtdgDk/VtU6wEaI=",
38 "owner": "SenchoPens",
39 "repo": "base16.nix",
40 "rev": "806a1777a5db2a1ef9d5d6f493ef2381047f2b89",
41 "type": "github"
42 },
43 "original": {
44 "owner": "SenchoPens",
45 "repo": "base16.nix",
46 "type": "github"
47 }
48 },
49 "base16-fish": {
50 "flake": false,
51 "locked": {
52 "lastModified": 1622559957,
53 "narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
54 "owner": "tomyun",
55 "repo": "base16-fish",
56 "rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
57 "type": "github"
58 },
59 "original": {
60 "owner": "tomyun",
61 "repo": "base16-fish",
62 "type": "github"
63 }
64 },
65 "base16-helix": {
66 "flake": false,
67 "locked": {
68 "lastModified": 1736852337,
69 "narHash": "sha256-esD42YdgLlEh7koBrSqcT7p2fsMctPAcGl/+2sYJa2o=",
70 "owner": "tinted-theming",
71 "repo": "base16-helix",
72 "rev": "03860521c40b0b9c04818f2218d9cc9efc21e7a5",
73 "type": "github"
74 },
75 "original": {
76 "owner": "tinted-theming",
77 "repo": "base16-helix",
78 "type": "github"
79 }
80 },
81 "base16-vim": {
82 "flake": false,
83 "locked": {
84 "lastModified": 1732806396,
85 "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
86 "owner": "tinted-theming",
87 "repo": "base16-vim",
88 "rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
89 "type": "github"
90 },
91 "original": {
92 "owner": "tinted-theming",
93 "repo": "base16-vim",
94 "rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
95 "type": "github"
96 }
97 },
9831 "darwin": {
9932 "inputs": {
10033 "nixpkgs": [
......@@ -102,11 +35,11 @@
10235 ]
10336 },
10437 "locked": {
105 "lastModified": 1747820204,
106 "narHash": "sha256-oY/mH8K1LOd+YbO58sw9ORtOdTxy3rR9lvTzOJKVUtA=",
38 "lastModified": 1751313918,
39 "narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=",
10740 "owner": "lnl7",
10841 "repo": "nix-darwin",
109 "rev": "e2676937faf868111dcea6a4a9cf4b6549907c9d",
42 "rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf",
11043 "type": "github"
11144 },
11245 "original": {
......@@ -116,54 +49,7 @@
11649 "type": "github"
11750 }
11851 },
119 "firefox-gnome-theme": {
120 "flake": false,
121 "locked": {
122 "lastModified": 1744642301,
123 "narHash": "sha256-5A6LL7T0lttn1vrKsNOKUk9V0ittdW0VEqh6AtefxJ4=",
124 "owner": "rafaelmardojai",
125 "repo": "firefox-gnome-theme",
126 "rev": "59e3de00f01e5adb851d824cf7911bd90c31083a",
127 "type": "github"
128 },
129 "original": {
130 "owner": "rafaelmardojai",
131 "repo": "firefox-gnome-theme",
132 "type": "github"
133 }
134 },
13552 "flake-compat": {
136 "flake": false,
137 "locked": {
138 "lastModified": 1746162366,
139 "narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=",
140 "owner": "nix-community",
141 "repo": "flake-compat",
142 "rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b",
143 "type": "github"
144 },
145 "original": {
146 "owner": "nix-community",
147 "repo": "flake-compat",
148 "type": "github"
149 }
150 },
151 "flake-compat_2": {
152 "locked": {
153 "lastModified": 1733328505,
154 "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
155 "owner": "edolstra",
156 "repo": "flake-compat",
157 "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
158 "type": "github"
159 },
160 "original": {
161 "owner": "edolstra",
162 "repo": "flake-compat",
163 "type": "github"
164 }
165 },
166 "flake-compat_3": {
16753 "flake": false,
16854 "locked": {
16955 "lastModified": 1696426674,
......@@ -179,7 +65,7 @@
17965 "type": "github"
18066 }
18167 },
182 "flake-compat_4": {
68 "flake-compat_2": {
18369 "flake": false,
18470 "locked": {
18571 "lastModified": 1696426674,
......@@ -200,11 +86,11 @@
20086 "nixpkgs-lib": "nixpkgs-lib"
20187 },
20288 "locked": {
203 "lastModified": 1743550720,
204 "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
89 "lastModified": 1749398372,
90 "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
20591 "owner": "hercules-ci",
20692 "repo": "flake-parts",
207 "rev": "c621e8422220273271f52058f618c94e405bb0f5",
93 "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
20894 "type": "github"
20995 },
21096 "original": {
......@@ -213,30 +99,27 @@
21399 "type": "github"
214100 }
215101 },
216 "flake-parts_2": {
102 "flake-utils": {
217103 "inputs": {
218 "nixpkgs-lib": [
219 "stylix",
220 "nixpkgs"
221 ]
104 "systems": "systems"
222105 },
223106 "locked": {
224 "lastModified": 1733312601,
225 "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
226 "owner": "hercules-ci",
227 "repo": "flake-parts",
228 "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
107 "lastModified": 1731533236,
108 "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
109 "owner": "numtide",
110 "repo": "flake-utils",
111 "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
229112 "type": "github"
230113 },
231114 "original": {
232 "owner": "hercules-ci",
233 "repo": "flake-parts",
115 "owner": "numtide",
116 "repo": "flake-utils",
234117 "type": "github"
235118 }
236119 },
237 "flake-utils": {
120 "flake-utils_2": {
238121 "inputs": {
239 "systems": "systems"
122 "systems": "systems_2"
240123 },
241124 "locked": {
242125 "lastModified": 1701680307,
......@@ -252,9 +135,9 @@
252135 "type": "github"
253136 }
254137 },
255 "flake-utils_2": {
138 "flake-utils_3": {
256139 "inputs": {
257 "systems": "systems_2"
140 "systems": "systems_3"
258141 },
259142 "locked": {
260143 "lastModified": 1731533236,
......@@ -270,9 +153,9 @@
270153 "type": "github"
271154 }
272155 },
273 "flake-utils_3": {
156 "flake-utils_4": {
274157 "inputs": {
275 "systems": "systems_3"
158 "systems": "systems_4"
276159 },
277160 "locked": {
278161 "lastModified": 1731533236,
......@@ -288,7 +171,7 @@
288171 "type": "github"
289172 }
290173 },
291 "flake-utils_4": {
174 "flake-utils_5": {
292175 "inputs": {
293176 "systems": "systems_6"
294177 },
......@@ -306,7 +189,7 @@
306189 "type": "github"
307190 }
308191 },
309 "flake-utils_5": {
192 "flake-utils_6": {
310193 "inputs": {
311194 "systems": "systems_7"
312195 },
......@@ -324,7 +207,7 @@
324207 "type": "github"
325208 }
326209 },
327 "flake-utils_6": {
210 "flake-utils_7": {
328211 "inputs": {
329212 "systems": "systems_8"
330213 },
......@@ -342,45 +225,18 @@
342225 "type": "github"
343226 }
344227 },
345 "fromYaml": {
346 "flake": false,
228 "flakey-profile": {
347229 "locked": {
348 "lastModified": 1731966426,
349 "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
350 "owner": "SenchoPens",
351 "repo": "fromYaml",
352 "rev": "106af9e2f715e2d828df706c386a685698f3223b",
230 "lastModified": 1712898590,
231 "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=",
232 "owner": "lf-",
233 "repo": "flakey-profile",
234 "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d",
353235 "type": "github"
354236 },
355237 "original": {
356 "owner": "SenchoPens",
357 "repo": "fromYaml",
358 "type": "github"
359 }
360 },
361 "git-hooks": {
362 "inputs": {
363 "flake-compat": [
364 "stylix",
365 "flake-compat"
366 ],
367 "gitignore": "gitignore_2",
368 "nixpkgs": [
369 "stylix",
370 "nixpkgs"
371 ]
372 },
373 "locked": {
374 "lastModified": 1742649964,
375 "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
376 "owner": "cachix",
377 "repo": "git-hooks.nix",
378 "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
379 "type": "github"
380 },
381 "original": {
382 "owner": "cachix",
383 "repo": "git-hooks.nix",
238 "owner": "lf-",
239 "repo": "flakey-profile",
384240 "type": "github"
385241 }
386242 },
......@@ -403,8 +259,7 @@
403259 "gitignore_2": {
404260 "inputs": {
405261 "nixpkgs": [
406 "stylix",
407 "git-hooks",
262 "zls",
408263 "nixpkgs"
409264 ]
410265 },
......@@ -422,105 +277,81 @@
422277 "type": "github"
423278 }
424279 },
425 "gitignore_3": {
280 "home-manager": {
426281 "inputs": {
427282 "nixpkgs": [
428 "zls",
429283 "nixpkgs"
430284 ]
431285 },
432286 "locked": {
433 "lastModified": 1709087332,
434 "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
435 "owner": "hercules-ci",
436 "repo": "gitignore.nix",
437 "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
287 "lastModified": 1751489990,
288 "narHash": "sha256-ENTd/sd4Vz/VJYn14SVqW1OH2m7WIAvsm9A9SrmDZRY=",
289 "owner": "nix-community",
290 "repo": "home-manager",
291 "rev": "89af52d9a893af013f5f4c1d2d56912106827153",
438292 "type": "github"
439293 },
440294 "original": {
441 "owner": "hercules-ci",
442 "repo": "gitignore.nix",
295 "owner": "nix-community",
296 "ref": "master",
297 "repo": "home-manager",
443298 "type": "github"
444299 }
445300 },
446 "gnome-shell": {
301 "langref": {
447302 "flake": false,
448303 "locked": {
449 "lastModified": 1744584021,
450 "narHash": "sha256-0RJ4mJzf+klKF4Fuoc8VN8dpQQtZnKksFmR2jhWE1Ew=",
451 "owner": "GNOME",
452 "repo": "gnome-shell",
453 "rev": "52c517c8f6c199a1d6f5118fae500ef69ea845ae",
454 "type": "github"
304 "narHash": "sha256-O6p2tiKD8ZMhSX+DeA/o5hhAvcPkU2J9lFys/r11peY=",
305 "type": "file",
306 "url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
455307 },
456308 "original": {
457 "owner": "GNOME",
458 "ref": "48.1",
459 "repo": "gnome-shell",
460 "type": "github"
309 "type": "file",
310 "url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
461311 }
462312 },
463 "home-manager": {
464 "inputs": {
465 "nixpkgs": [
466 "nixpkgs"
467 ]
468 },
313 "lix": {
314 "flake": false,
469315 "locked": {
470 "lastModified": 1747834438,
471 "narHash": "sha256-AHJt79W8wADzur2htCx1U8FtEk4XjvrHb9/3iDfNedI=",
472 "owner": "nix-community",
473 "repo": "home-manager",
474 "rev": "6c2eb1e24cd0e76d88bdd633ef4c50d6286586e0",
475 "type": "github"
316 "lastModified": 1746827285,
317 "narHash": "sha256-hsFe4Tsqqg4l+FfQWphDtjC79WzNCZbEFhHI8j2KJzw=",
318 "rev": "47aad376c87e2e65967f17099277428e4b3f8e5a",
319 "type": "tarball",
320 "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/47aad376c87e2e65967f17099277428e4b3f8e5a.tar.gz?rev=47aad376c87e2e65967f17099277428e4b3f8e5a"
476321 },
477322 "original": {
478 "owner": "nix-community",
479 "ref": "master",
480 "repo": "home-manager",
481 "type": "github"
323 "type": "tarball",
324 "url": "https://git.lix.systems/lix-project/lix/archive/2.93.0.tar.gz"
482325 }
483326 },
484 "home-manager_2": {
327 "lix-module": {
485328 "inputs": {
329 "flake-utils": "flake-utils",
330 "flakey-profile": "flakey-profile",
331 "lix": "lix",
486332 "nixpkgs": [
487 "stylix",
488333 "nixpkgs"
489334 ]
490335 },
491336 "locked": {
492 "lastModified": 1747763032,
493 "narHash": "sha256-9j3oCbemeH7bTVXJ3pDWxOptbxDx2SdK1jY2AHpjQiw=",
494 "owner": "nix-community",
495 "repo": "home-manager",
496 "rev": "29dda415f5b2178278283856c6f9f7b48a2a4353",
497 "type": "github"
498 },
499 "original": {
500 "owner": "nix-community",
501 "repo": "home-manager",
502 "type": "github"
503 }
504 },
505 "langref": {
506 "flake": false,
507 "locked": {
508 "narHash": "sha256-O6p2tiKD8ZMhSX+DeA/o5hhAvcPkU2J9lFys/r11peY=",
509 "type": "file",
510 "url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
337 "lastModified": 1746838955,
338 "narHash": "sha256-11R4K3iAx4tLXjUs+hQ5K90JwDABD/XHhsM9nkeS5N8=",
339 "rev": "cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc",
340 "type": "tarball",
341 "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc.tar.gz?rev=cd2a9c028df820a83ca2807dc6c6e7abc3dfa7fc"
511342 },
512343 "original": {
513 "type": "file",
514 "url": "https://raw.githubusercontent.com/ziglang/zig/0fb2015fd3422fc1df364995f9782dfe7255eccd/doc/langref.html.in"
344 "type": "tarball",
345 "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz"
515346 }
516347 },
517348 "mnw": {
518349 "locked": {
519 "lastModified": 1747499976,
520 "narHash": "sha256-YTiSI4WLbk0CleXeBheYmKZV6iqKyBpyoh1e+vcQzu4=",
350 "lastModified": 1748710831,
351 "narHash": "sha256-eZu2yH3Y2eA9DD3naKWy/sTxYS5rPK2hO7vj8tvUCSU=",
521352 "owner": "Gerg-L",
522353 "repo": "mnw",
523 "rev": "72433a144c4ac16931e9148f78db4a0e4c147441",
354 "rev": "cff958a4e050f8d917a6ff3a5624bc4681c6187d",
524355 "type": "github"
525356 },
526357 "original": {
......@@ -531,17 +362,17 @@
531362 },
532363 "moonlight": {
533364 "inputs": {
534 "flake-utils": "flake-utils",
365 "flake-utils": "flake-utils_2",
535366 "nixpkgs": [
536367 "nixpkgs"
537368 ]
538369 },
539370 "locked": {
540 "lastModified": 1747413594,
541 "narHash": "sha256-cFsVYlIkSNEpGw4qT9Eea6sa1+dZyaCRZNrgQTc8wu4=",
371 "lastModified": 1750621684,
372 "narHash": "sha256-E8iHTYK9iUtIjYgBNj54Xeulj9WaxSGDbzOLLFhCSqA=",
542373 "owner": "moonlight-mod",
543374 "repo": "moonlight",
544 "rev": "fc7c0119e923d50ce8873ea654fa7542f60be27f",
375 "rev": "9398874e59f5e2b8485c489ce6c0f6c9c7d210a0",
545376 "type": "github"
546377 },
547378 "original": {
......@@ -557,11 +388,11 @@
557388 ]
558389 },
559390 "locked": {
560 "lastModified": 1747847914,
561 "narHash": "sha256-Ut9RZVAaKUD4A3RrXP5RhNVZ+LVy5mL4mMmiTDWaQE8=",
391 "lastModified": 1751375534,
392 "narHash": "sha256-9z1W64dDVtVxqgPzUbjIQqRfygg1hdivUOZ6d/H+yFg=",
562393 "owner": "viperML",
563394 "repo": "nh",
564 "rev": "45048d3e9f183f3f09fddf667841b7327c04ad8f",
395 "rev": "d0abb8eebe32f79ce4659e68dd777cf497a5d3d2",
565396 "type": "github"
566397 },
567398 "original": {
......@@ -572,22 +403,17 @@
572403 },
573404 "nil": {
574405 "inputs": {
575 "flake-utils": [
576 "nvf",
577 "flake-utils"
578 ],
579406 "nixpkgs": [
580407 "nvf",
581408 "nixpkgs"
582 ],
583 "rust-overlay": "rust-overlay_2"
409 ]
584410 },
585411 "locked": {
586 "lastModified": 1741118843,
587 "narHash": "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c=",
412 "lastModified": 1750047244,
413 "narHash": "sha256-vluLARrk4485npdyHOj8XKr0yk6H22pNf+KVRNL+i/Y=",
588414 "owner": "oxalica",
589415 "repo": "nil",
590 "rev": "577d160da311cc7f5042038456a0713e9863d09e",
416 "rev": "870a4b1b5f12004832206703ac15aa85c42c247b",
591417 "type": "github"
592418 },
593419 "original": {
......@@ -603,11 +429,11 @@
603429 ]
604430 },
605431 "locked": {
606 "lastModified": 1747540584,
607 "narHash": "sha256-cxCQ413JTUuRv9Ygd8DABJ1D6kuB/nTfQqC0Lu9C0ls=",
432 "lastModified": 1751170039,
433 "narHash": "sha256-3EKpUmyGmHYA/RuhZjINTZPU+OFWko0eDwazUOW64nw=",
608434 "owner": "nix-community",
609435 "repo": "nix-index-database",
610 "rev": "ec179dd13fb7b4c6844f55be91436f7857226dce",
436 "rev": "9c932ae632d6b5150515e5749b198c175d8565db",
611437 "type": "github"
612438 },
613439 "original": {
......@@ -618,7 +444,7 @@
618444 },
619445 "nix-options-search": {
620446 "inputs": {
621 "flake-utils": "flake-utils_2",
447 "flake-utils": "flake-utils_3",
622448 "gitignore": "gitignore",
623449 "nixpkgs": "nixpkgs"
624450 },
......@@ -636,29 +462,6 @@
636462 "type": "github"
637463 }
638464 },
639 "nixos-cosmic": {
640 "inputs": {
641 "flake-compat": "flake-compat",
642 "nixpkgs": [
643 "nixpkgs"
644 ],
645 "nixpkgs-stable": "nixpkgs-stable",
646 "rust-overlay": "rust-overlay"
647 },
648 "locked": {
649 "lastModified": 1747826251,
650 "narHash": "sha256-Fe4AXmnnAKnh/wIe1ao4Pv/8m6WGA1ujwp6VApgos30=",
651 "owner": "lilyinstarlight",
652 "repo": "nixos-cosmic",
653 "rev": "9a67b4a289cd8994080398d40b57cfde8e8cfb0a",
654 "type": "github"
655 },
656 "original": {
657 "owner": "lilyinstarlight",
658 "repo": "nixos-cosmic",
659 "type": "github"
660 }
661 },
662465 "nixpkgs": {
663466 "locked": {
664467 "lastModified": 1736012469,
......@@ -677,11 +480,11 @@
677480 },
678481 "nixpkgs-lib": {
679482 "locked": {
680 "lastModified": 1743296961,
681 "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
483 "lastModified": 1748740939,
484 "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=",
682485 "owner": "nix-community",
683486 "repo": "nixpkgs.lib",
684 "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
487 "rev": "656a64127e9d791a334452c6b6606d17539476e2",
685488 "type": "github"
686489 },
687490 "original": {
......@@ -690,44 +493,13 @@
690493 "type": "github"
691494 }
692495 },
693 "nixpkgs-stable": {
694 "locked": {
695 "lastModified": 1747676747,
696 "narHash": "sha256-LXkWBVqilgx7Pohwqu/ABxDVw+Cmi5/Mj2S2mpUH0Fw=",
697 "owner": "NixOS",
698 "repo": "nixpkgs",
699 "rev": "72841a4a8761d1aed92ef6169a636872c986c76d",
700 "type": "github"
701 },
702 "original": {
703 "owner": "NixOS",
704 "ref": "nixos-24.11",
705 "repo": "nixpkgs",
706 "type": "github"
707 }
708 },
709 "nixpkgs-stable_2": {
710 "locked": {
711 "lastModified": 1720535198,
712 "narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=",
713 "owner": "NixOS",
714 "repo": "nixpkgs",
715 "rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5",
716 "type": "github"
717 },
718 "original": {
719 "id": "nixpkgs",
720 "ref": "nixos-23.11",
721 "type": "indirect"
722 }
723 },
724496 "nixpkgs_2": {
725497 "locked": {
726 "lastModified": 1747744144,
727 "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
498 "lastModified": 1751271578,
499 "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=",
728500 "owner": "NixOS",
729501 "repo": "nixpkgs",
730 "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
502 "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df",
731503 "type": "github"
732504 },
733505 "original": {
......@@ -768,49 +540,23 @@
768540 "type": "github"
769541 }
770542 },
771 "nur": {
772 "inputs": {
773 "flake-parts": [
774 "stylix",
775 "flake-parts"
776 ],
777 "nixpkgs": [
778 "stylix",
779 "nixpkgs"
780 ],
781 "treefmt-nix": "treefmt-nix"
782 },
783 "locked": {
784 "lastModified": 1746056780,
785 "narHash": "sha256-/emueQGaoT4vu0QjU9LDOG5roxRSfdY0K2KkxuzazcM=",
786 "owner": "nix-community",
787 "repo": "NUR",
788 "rev": "d476cd0972dd6242d76374fcc277e6735715c167",
789 "type": "github"
790 },
791 "original": {
792 "owner": "nix-community",
793 "repo": "NUR",
794 "type": "github"
795 }
796 },
797543 "nvf": {
798544 "inputs": {
799545 "flake-parts": "flake-parts",
800 "flake-utils": "flake-utils_3",
546 "flake-utils": "flake-utils_4",
801547 "mnw": "mnw",
802548 "nil": "nil",
803549 "nixpkgs": [
804550 "nixpkgs"
805551 ],
806 "systems": "systems_4"
552 "systems": "systems_5"
807553 },
808554 "locked": {
809 "lastModified": 1747525582,
810 "narHash": "sha256-oEZ6DV4bPcNZIuwW5Kcd+/zT3PMkXse2kX/3jHoomGk=",
555 "lastModified": 1751186226,
556 "narHash": "sha256-Bt7jtmCW72JUPxOIrV73qBTAUOy4qvJXsls2ERDUcGo=",
811557 "owner": "notashelf",
812558 "repo": "nvf",
813 "rev": "d3a0e7029ac57eef1120225973247851c5b967b5",
559 "rev": "5bad5dd94ce5ea3b40b08d9e6802e69d02198d21",
814560 "type": "github"
815561 },
816562 "original": {
......@@ -836,16 +582,15 @@
836582 "apple-fonts": "apple-fonts",
837583 "darwin": "darwin",
838584 "home-manager": "home-manager",
585 "lix-module": "lix-module",
839586 "moonlight": "moonlight",
840587 "nh": "nh",
841588 "nix-index-database": "nix-index-database",
842589 "nix-options-search": "nix-options-search",
843 "nixos-cosmic": "nixos-cosmic",
844590 "nixpkgs": "nixpkgs_2",
845 "nixpkgs-stable": "nixpkgs-stable_2",
846591 "nvf": "nvf",
847 "rust-overlay": "rust-overlay_3",
848 "stylix": "stylix",
592 "rust-overlay": "rust-overlay",
593 "zen-browser": "zen-browser",
849594 "zig": "zig",
850595 "zls": "zls"
851596 }
......@@ -853,58 +598,15 @@
853598 "rust-overlay": {
854599 "inputs": {
855600 "nixpkgs": [
856 "nixos-cosmic",
857601 "nixpkgs"
858602 ]
859603 },
860604 "locked": {
861 "lastModified": 1747795013,
862 "narHash": "sha256-c7i0xJ+xFhgjO9SWHYu5dF/7lq63RPDvwKAdjc6VCE4=",
605 "lastModified": 1751423951,
606 "narHash": "sha256-AowKhJGplXRkAngSvb+32598DTiI6LOzhAnzgvbCtYM=",
863607 "owner": "oxalica",
864608 "repo": "rust-overlay",
865 "rev": "6b1cf12374361859242a562e1933a7930649131a",
866 "type": "github"
867 },
868 "original": {
869 "owner": "oxalica",
870 "repo": "rust-overlay",
871 "type": "github"
872 }
873 },
874 "rust-overlay_2": {
875 "inputs": {
876 "nixpkgs": [
877 "nvf",
878 "nil",
879 "nixpkgs"
880 ]
881 },
882 "locked": {
883 "lastModified": 1741055476,
884 "narHash": "sha256-52vwEV0oS2lCnx3c/alOFGglujZTLmObit7K8VblnS8=",
885 "owner": "oxalica",
886 "repo": "rust-overlay",
887 "rev": "aefb7017d710f150970299685e8d8b549d653649",
888 "type": "github"
889 },
890 "original": {
891 "owner": "oxalica",
892 "repo": "rust-overlay",
893 "type": "github"
894 }
895 },
896 "rust-overlay_3": {
897 "inputs": {
898 "nixpkgs": [
899 "nixpkgs"
900 ]
901 },
902 "locked": {
903 "lastModified": 1747795013,
904 "narHash": "sha256-c7i0xJ+xFhgjO9SWHYu5dF/7lq63RPDvwKAdjc6VCE4=",
905 "owner": "oxalica",
906 "repo": "rust-overlay",
907 "rev": "6b1cf12374361859242a562e1933a7930649131a",
609 "rev": "1684ed5b15859b655caf41b467d046e29a994d04",
908610 "type": "github"
909611 },
910612 "original": {
......@@ -997,43 +699,6 @@
997699 "url": "https://devimages-cdn.apple.com/design/resources/download/SF-Pro.dmg"
998700 }
999701 },
1000 "stylix": {
1001 "inputs": {
1002 "base16": "base16",
1003 "base16-fish": "base16-fish",
1004 "base16-helix": "base16-helix",
1005 "base16-vim": "base16-vim",
1006 "firefox-gnome-theme": "firefox-gnome-theme",
1007 "flake-compat": "flake-compat_2",
1008 "flake-parts": "flake-parts_2",
1009 "git-hooks": "git-hooks",
1010 "gnome-shell": "gnome-shell",
1011 "home-manager": "home-manager_2",
1012 "nixpkgs": [
1013 "nixpkgs"
1014 ],
1015 "nur": "nur",
1016 "systems": "systems_5",
1017 "tinted-foot": "tinted-foot",
1018 "tinted-kitty": "tinted-kitty",
1019 "tinted-schemes": "tinted-schemes",
1020 "tinted-tmux": "tinted-tmux",
1021 "tinted-zed": "tinted-zed"
1022 },
1023 "locked": {
1024 "lastModified": 1747847674,
1025 "narHash": "sha256-XYVaUKQrda7WOSonewDtpvm8tENIcwWrErobUYMTMoc=",
1026 "owner": "danth",
1027 "repo": "stylix",
1028 "rev": "4ce349da56e075f7e3456b48731cbbf5ae8b1eb8",
1029 "type": "github"
1030 },
1031 "original": {
1032 "owner": "danth",
1033 "repo": "stylix",
1034 "type": "github"
1035 }
1036 },
1037702 "systems": {
1038703 "locked": {
1039704 "lastModified": 1681028828,
......@@ -1154,121 +819,38 @@
1154819 "type": "github"
1155820 }
1156821 },
1157 "tinted-foot": {
1158 "flake": false,
1159 "locked": {
1160 "lastModified": 1726913040,
1161 "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
1162 "owner": "tinted-theming",
1163 "repo": "tinted-foot",
1164 "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
1165 "type": "github"
1166 },
1167 "original": {
1168 "owner": "tinted-theming",
1169 "repo": "tinted-foot",
1170 "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
1171 "type": "github"
1172 }
1173 },
1174 "tinted-kitty": {
1175 "flake": false,
1176 "locked": {
1177 "lastModified": 1735730497,
1178 "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=",
1179 "owner": "tinted-theming",
1180 "repo": "tinted-kitty",
1181 "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa",
1182 "type": "github"
1183 },
1184 "original": {
1185 "owner": "tinted-theming",
1186 "repo": "tinted-kitty",
1187 "type": "github"
1188 }
1189 },
1190 "tinted-schemes": {
1191 "flake": false,
1192 "locked": {
1193 "lastModified": 1744974599,
1194 "narHash": "sha256-Fg+rdGs5FAgfkYNCs74lnl8vkQmiZVdBsziyPhVqrlY=",
1195 "owner": "tinted-theming",
1196 "repo": "schemes",
1197 "rev": "28c26a621123ad4ebd5bbfb34ab39421c0144bdd",
1198 "type": "github"
1199 },
1200 "original": {
1201 "owner": "tinted-theming",
1202 "repo": "schemes",
1203 "type": "github"
1204 }
1205 },
1206 "tinted-tmux": {
1207 "flake": false,
1208 "locked": {
1209 "lastModified": 1745111349,
1210 "narHash": "sha256-udV+nHdpqgkJI9D0mtvvAzbqubt9jdifS/KhTTbJ45w=",
1211 "owner": "tinted-theming",
1212 "repo": "tinted-tmux",
1213 "rev": "e009f18a01182b63559fb28f1c786eb027c3dee9",
1214 "type": "github"
1215 },
1216 "original": {
1217 "owner": "tinted-theming",
1218 "repo": "tinted-tmux",
1219 "type": "github"
1220 }
1221 },
1222 "tinted-zed": {
1223 "flake": false,
1224 "locked": {
1225 "lastModified": 1725758778,
1226 "narHash": "sha256-8P1b6mJWyYcu36WRlSVbuj575QWIFZALZMTg5ID/sM4=",
1227 "owner": "tinted-theming",
1228 "repo": "base16-zed",
1229 "rev": "122c9e5c0e6f27211361a04fae92df97940eccf9",
1230 "type": "github"
1231 },
1232 "original": {
1233 "owner": "tinted-theming",
1234 "repo": "base16-zed",
1235 "type": "github"
1236 }
1237 },
1238 "treefmt-nix": {
822 "zen-browser": {
1239823 "inputs": {
1240824 "nixpkgs": [
1241 "stylix",
1242 "nur",
1243825 "nixpkgs"
1244826 ]
1245827 },
1246828 "locked": {
1247 "lastModified": 1733222881,
1248 "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
1249 "owner": "numtide",
1250 "repo": "treefmt-nix",
1251 "rev": "49717b5af6f80172275d47a418c9719a31a78b53",
829 "lastModified": 1751256876,
830 "narHash": "sha256-4A8LmE0Hd9RvQwSEPYdITJebpLt7J99VY76IphzqZKc=",
831 "owner": "youwen5",
832 "repo": "zen-browser-flake",
833 "rev": "615b9244dc7ac777b8f0bc3a9cb7290936e4fcf9",
1252834 "type": "github"
1253835 },
1254836 "original": {
1255 "owner": "numtide",
1256 "repo": "treefmt-nix",
837 "owner": "youwen5",
838 "repo": "zen-browser-flake",
1257839 "type": "github"
1258840 }
1259841 },
1260842 "zig": {
1261843 "inputs": {
1262 "flake-compat": "flake-compat_3",
1263 "flake-utils": "flake-utils_4",
844 "flake-compat": "flake-compat",
845 "flake-utils": "flake-utils_5",
1264846 "nixpkgs": "nixpkgs_3"
1265847 },
1266848 "locked": {
1267 "lastModified": 1747829603,
1268 "narHash": "sha256-H8Vj7GSOyHgAUTDM/EkkdiTyEZg2C1UUlsp/fDSbxNQ=",
849 "lastModified": 1751458413,
850 "narHash": "sha256-eyKdTzRaY4blNs/GVJODh4E+16wpEKmlnQUpGf9e9gc=",
1269851 "owner": "mitchellh",
1270852 "repo": "zig-overlay",
1271 "rev": "53899a028ece2f77939c08c59d547416a59086c0",
853 "rev": "4f33e11d99060c5cb2bdc380a11a9b23858dcfde",
1272854 "type": "github"
1273855 },
1274856 "original": {
......@@ -1279,8 +861,8 @@
1279861 },
1280862 "zig-overlay": {
1281863 "inputs": {
1282 "flake-compat": "flake-compat_4",
1283 "flake-utils": "flake-utils_6",
864 "flake-compat": "flake-compat_2",
865 "flake-utils": "flake-utils_7",
1284866 "nixpkgs": [
1285867 "zls",
1286868 "nixpkgs"
......@@ -1302,8 +884,8 @@
1302884 },
1303885 "zls": {
1304886 "inputs": {
1305 "flake-utils": "flake-utils_5",
1306 "gitignore": "gitignore_3",
887 "flake-utils": "flake-utils_6",
888 "gitignore": "gitignore_2",
1307889 "langref": "langref",
1308890 "nixpkgs": "nixpkgs_4",
1309891 "zig-overlay": "zig-overlay"
flake.nix+11-9
......@@ -2,7 +2,11 @@
22 description = "multi device configuration flake";
33 inputs = {
44 nixpkgs.url = "nixpkgs/nixos-unstable";
5 nixpkgs-stable.url = "nixpkgs/nixos-23.11";
5
6 lix-module = {
7 url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz";
8 inputs.nixpkgs.follows = "nixpkgs";
9 };
610
711 home-manager.url = "github:nix-community/home-manager/master";
812 home-manager.inputs.nixpkgs.follows = "nixpkgs";
......@@ -22,15 +26,13 @@
2226 zig.url = "github:mitchellh/zig-overlay";
2327 zls.url = "github:zigtools/zls?rev=a26718049a8657d4da04c331aeced1697bc7652b";
2428
25 stylix.url = "github:danth/stylix";
26 stylix.inputs.nixpkgs.follows = "nixpkgs";
27
2829 moonlight.url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
2930 moonlight.inputs.nixpkgs.follows = "nixpkgs";
3031
31 nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
32 nixos-cosmic.inputs.nixpkgs.follows = "nixpkgs";
33
32 zen-browser = {
33 url = "github:youwen5/zen-browser-flake";
34 inputs.nixpkgs.follows = "nixpkgs";
35 };
3436 nh.url = "github:viperML/nh";
3537 nh.inputs.nixpkgs.follows = "nixpkgs";
3638
......@@ -43,7 +45,7 @@
4345 {
4446 self,
4547 nixpkgs,
46 nixos-cosmic,
48 lix-module,
4749 darwin,
4850 ...
4951 }@inputs:
......@@ -92,6 +94,7 @@
9294 inherit
9395 overlays
9496 nixpkgs
97 lix-module
9598 inputs
9699 mkNeovim
97100 ;
......@@ -127,7 +130,6 @@
127130 host = "desktop";
128131 system = "x86_64-linux";
129132 extraModules = [
130 nixos-cosmic.nixosModules.default
131133 ];
132134 };
133135 # natalie's laptop
lib/mkSystem.nix+59-78
......@@ -2,32 +2,24 @@
22# particular architecture.
33{
44 nixpkgs,
5 lix-module,
56 overlays,
67 inputs,
78 mkNeovim,
8}: name: {
9}:
10name:
11{
912 user, # ./users/{name}
1013 host, # ./users/{name}/{host}
1114 system, # arch-os
12 extraModules ? [],
13}: let
15 extraModules ? [ ],
16}:
17let
1418 darwin = nixpkgs.lib.strings.hasSuffix "-darwin" system;
15 getInputModule = a: b:
16 inputs.${
17 a
18 }.${
19 if darwin
20 then "darwinModules"
21 else "nixosModules"
22 }.${
23 b
24 };
19 getInputModule = a: b: inputs.${a}.${if darwin then "darwinModules" else "nixosModules"}.${b};
2520
2621 # NixOS vs nix-darwin functions
27 systemFunc =
28 if darwin
29 then inputs.darwin.lib.darwinSystem
30 else nixpkgs.lib.nixosSystem;
22 systemFunc = if darwin then inputs.darwin.lib.darwinSystem else nixpkgs.lib.nixosSystem;
3123
3224 userDir = ../users + "/${user}";
3325 userConfig = import (userDir + "/user.nix");
......@@ -38,10 +30,7 @@
3830 hostHomePath = hostDir + "/home.nix";
3931 userHomePath = userDir + "/home.nix";
4032
41 pathOrNull = a:
42 if builtins.pathExists a
43 then a
44 else null;
33 pathOrNull = a: if builtins.pathExists a then a else null;
4534
4635 # Arguments passed to all module files
4736 args = {
......@@ -68,18 +57,14 @@
6857 term, # preferred $TERM
6958 editor, # preferred $EDITOR
7059 browser ? null, # preferred $BROWSER
71 } @ user:
72 user
60 }@user:
61 user
7362 )
74 userConfig;
63 userConfig;
7564 };
7665 systemSettings = rec {
7766 inherit darwin;
78 homeDir = "/${
79 if darwin
80 then "Users"
81 else "home"
82 }/${userConfig.username}";
67 homeDir = "/${if darwin then "Users" else "home"}/${userConfig.username}";
8368 };
8469
8570 mainHomeImports = builtins.filter (f: f != null) [
......@@ -92,60 +77,56 @@
9277 }
9378 ];
9479in
95 systemFunc {
96 inherit system;
80systemFunc {
81 inherit system;
9782
98 modules =
99 builtins.filter (f: f != null) [
100 # Apply our overlays. Overlays are keyed by system type so we have
101 # to go through and apply our system type. We do this first so
102 # the overlays are available globally.
103 {nixpkgs.overlays = overlays;}
83 modules =
84 builtins.filter (f: f != null) [
85 # Apply our overlays. Overlays are keyed by system type so we have
86 # to go through and apply our system type. We do this first so
87 # the overlays are available globally.
88 { nixpkgs.overlays = overlays; }
10489
105 # Modules shared between nix-darwin and NixOS
106 ../modules/shared
107 # Modules for the specific OS
108 (
109 if darwin
110 then ../modules/macos
111 else ../modules/nixos
112 )
90 # Use lix (alternative nix implementation)
91 # https://lix.systems/add-to-config/#flake-based-configurations
92 lix-module.nixosModules.default
93 # (getInputModule "lix-module" "default")
11394
114 # The user-wide configuration.nix
115 (pathOrNull userConfigPath)
116 # The host-wide configuration.nix
117 (pathOrNull hostConfigPath)
95 # Modules shared between nix-darwin and NixOS
96 ../modules/shared
97 # Modules for the specific OS
98 (if darwin then ../modules/macos else ../modules/nixos)
11899
119 # Set up nix-index and enable comma for easy one-shot command use
120 # https://github.com/nix-community/comma
121 (getInputModule "nix-index-database" "nix-index")
122 {programs.nix-index-database.comma.enable = true;}
100 # The user-wide configuration.nix
101 (pathOrNull userConfigPath)
102 # The host-wide configuration.nix
103 (pathOrNull hostConfigPath)
123104
124 # Themes for all programs
125 (getInputModule "stylix" "stylix")
105 # Set up nix-index and enable comma for easy one-shot command use
106 # https://github.com/nix-community/comma
107 (getInputModule "nix-index-database" "nix-index")
108 { programs.nix-index-database.comma.enable = true; }
126109
127 # Home manager
128 (getInputModule "home-manager" "home-manager")
129 {
130 home-manager = {
131 useGlobalPkgs = true;
132 useUserPackages = true;
133 backupFileExtension = "hm-backup";
134 # Arguments passed to all module files
135 extraSpecialArgs =
136 args
137 // {
138 inherit mainHomeImports;
139 };
140 # can't find how to make this an array without the param
141 users.${userConfig.username} = ../modules/home;
110 # Home manager
111 (getInputModule "home-manager" "home-manager")
112 {
113 home-manager = {
114 useGlobalPkgs = true;
115 useUserPackages = true;
116 backupFileExtension = "hm-backup";
117 # Arguments passed to all module files
118 extraSpecialArgs = args // {
119 inherit mainHomeImports;
142120 };
143 users.users.${userConfig.username}.home = systemSettings.homeDir;
144 }
121 # can't find how to make this an array without the param
122 users.${userConfig.username} = ../modules/home;
123 };
124 users.users.${userConfig.username}.home = systemSettings.homeDir;
125 }
145126
146 # Arguments passed to all module files
147 {config._module.args = args;}
148 ]
149 # Add extra modules specified from config
150 ++ extraModules;
151 }
127 # Arguments passed to all module files
128 { config._module.args = args; }
129 ]
130 # Add extra modules specified from config
131 ++ extraModules;
132}
modules/home/default.nix+1-1
......@@ -86,8 +86,8 @@ in
8686 };
8787 shellInit = ''
8888 batman --export-env | source
89 test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true
8990 '';
90 ##test -r '/Users/${user.username}/.opam/opam-init/init.fish' && source '/Users/${user.username}/.opam/opam-init/init.fish' > /dev/null 2> /dev/null; or true
9191 };
9292 };
9393}
modules/home/macos/sketchybar.nix+520-513
......@@ -2,428 +2,339 @@
22 pkgs,
33 lib,
44 config,
5 host,
56 ...
6}: {
7}:
8{
79 home.file =
8 lib.attrsets.mapAttrs (file: value: (
9 lib.attrsets.overrideExisting value {enable = config.shared.darwin.tiling.enable;}
10 )) {
11 sketchybarrc = {
12 executable = true;
13 target = ".config/sketchybar/sketchybarrc";
14 text = ''
15 #!/usr/bin/env sh
16
17 source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
18
19 ITEM_DIR="$HOME/.config/sketchybar/items" # Directory where the items are configured
20 PLUGIN_DIR="$HOME/.config/sketchybar/plugins" # Directory where all the plugin scripts are stored
21
22 FONT="SF Pro" # Needs to have Regular, Bold, Semibold, Heavy and Black variants
23 PADDINGS=3 # All paddings use this value (icon, label, background)
24
25
26 # Setting up the general bar appearance and default values
27 ${pkgs.sketchybar}/bin/sketchybar --bar height=40 \
28 blur_radius=30 \
29 position=top \
30 sticky=on \
31 padding_left=10 \
32 padding_right=10
33
34
35 ${pkgs.sketchybar}/bin/sketchybar --default icon.font="SF Pro:Semibold:12.0" \
36 icon.color=$ITEM_COLOR \
37 label.font="SF Pro:Semibold:12.0" \
38 label.color=$ITEM_COLOR \
39 background.color=$ACCENT_COLOR \
40 background.corner_radius=10 \
41 background.height=20 \
42 padding_left=4 \
43 padding_right=4 \
44 icon.padding_left=6 \
45 icon.padding_right=3 \
46 label.padding_left=3 \
47 label.padding_right=6
48
49
50 # Left
51 # source "$ITEM_DIR/apple.sh"
52 source "$ITEM_DIR/spaces.sh"
53 source "$ITEM_DIR/front_app.sh"
54
55 # Center
56 # source "$ITEM_DIR/spotify.sh"
57 source "$ITEM_DIR/calendar.sh"
58
59 # Right
60 source $ITEM_DIR/calendar.sh
61 source $ITEM_DIR/wifi.sh
62 source $ITEM_DIR/battery.sh
63 source $ITEM_DIR/volume.sh
64
65 # Forcing all item scripts to run (never do this outside of sketchybarrc)
66 ${pkgs.sketchybar}/bin/sketchybar --update
67
68 echo "sketchybar configuation loaded.."
69 '';
70 };
71 icons = {
72 executable = true;
73 target = ".config/sketchybar/plugins/icons.sh";
74 text = ''
75 #!/usr/bin/env sh
76
77 # Source the icon map with all the application icons
78 source ${pkgs.sketchybar-app-font}/bin/icon_map.sh
79
80 # Create a cache directory if it doesn't exist
81 CACHE_DIR="$HOME/.cache/sketchybar"
82 mkdir -p "$CACHE_DIR"
83
84 # Cache file for icon mappings
85 ICON_CACHE="$CACHE_DIR/icon_cache.txt"
86
87 # Create the cache file if it doesn't exist
88 if [ ! -f "$ICON_CACHE" ]; then
89 touch "$ICON_CACHE"
90 fi
91
92 # Check if the app is already in cache
93 APP_NAME=$(if [ "$1" = "Zen" ]; then echo "Zen Browser"; else echo "$1"; fi)
94
95 CACHED_ICON=$(grep "^$APP_NAME|" "$ICON_CACHE" | cut -d '|' -f2)
96
97 if [ -n "$CACHED_ICON" ]; then
98 # Cache hit, return the icon
99 echo "$CACHED_ICON"
100 exit 0
101 fi
102
103 # Get icon from the mapping function
104 __icon_map "$APP_NAME"
105
106 if [ -n "$icon_result" ]; then
107 echo "$APP_NAME|$icon_result" >>"$ICON_CACHE"
108 fi
109
110 echo "$icon_result"
111 '';
112 };
113 colors = {
114 executable = true;
115 target = ".config/sketchybar/colors.sh";
116 text = ''
117
118 export TRANSPARENT=0x00ffffff
119
120 # -- Gray Scheme --
121 export ITEM_COLOR=0xff000000
122 export ACCENT_COLOR=0xffc3c6cb
123
124 # -- White Scheme --
125 # export ITEM_COLOR=0xff000000
126 # export ACCENT_COLOR=0xffffffff
127
128 # -- Teal Scheme --
129 # export ITEM_COLOR=0xff000000
130 # export ACCENT_COLOR=0xff2cf9ed
131
132 # -- Purple Scheme --
133 # export ITEM_COLOR=0xff000000
134 # export ACCENT_COLOR=0xffeb46f9
135
136 # -- Red Scheme ---
137 # export ITEM_COLOR=0xff000000
138 # export ACCENT_COLOR=0xffff2453
139
140 # -- Blue Scheme ---
141 # export ITEM_COLOR=0xff000000
142 # export ACCENT_COLOR=0xff15bdf9
143
144 # -- Green Scheme --
145 # export ITEM_COLOR=0xff000000
146 # export ACCENT_COLOR=0xff1dfca1
147
148 # -- Orange Scheme --
149 # export ITEM_COLOR=0xffffffff
150 # export ACCENT_COLOR=0xfff97716
151
152 # -- Yellow Scheme --
153 # export ITEM_COLOR=0xff000000
154 # export ACCENT_COLOR=0xfff7fc17
155 '';
156 };
157 items_wifi = {
158 executable = true;
159 target = ".config/sketchybar/items/wifi.sh";
160 text = ''
161 #!/usr/bin/env/ sh
162
163 sketchybar --add item wifi right \
164 --set wifi \
165 icon="􀙥" \
166 label="Updating..." \
167 script="$PLUGIN_DIR/wifi.sh" \
168 --subscribe wifi wifi_change
169 '';
170 };
171 items_battery = {
172 executable = true;
173 target = ".config/sketchybar/items/battery.sh";
174 text = ''
175 #!/usr/bin/env/ sh
176 sketchybar --add item battery right \
177 --set battery update_freq=180 \
178 script="$PLUGIN_DIR/battery.sh" \
179 --subscribe battery system_woke power_source_change
180 '';
181 };
182 items_calendar = {
183 executable = true;
184 target = ".config/sketchybar/items/calendar.sh";
185 text = ''
186 #!/usr/bin/env sh
187 sketchybar --add item calendar right \
188 --set calendar icon=ô€§ž \
189 update_freq=15 \
190 script="$PLUGIN_DIR/calendar.sh"
191 '';
192 };
193 items_front_app = {
194 executable = true;
195 target = ".config/sketchybar/items/front_app.sh";
196 text = ''
197 #!/usr/bin/env sh
198
199 sketchybar --add item front_app left \
200 --set front_app background.color=$ACCENT_COLOR \
201 icon.color=$ITEM_COLOR \
202 label.color=$ITEM_COLOR \
203 icon.font="sketchybar-app-font:Regular:12.0" \
204 label.font="SF Pro:Semibold:12.0" \
205 script="$PLUGIN_DIR/front_app.sh" \
206 --subscribe front_app front_app_switched
207 '';
208 };
209 items_spaces = {
210 executable = true;
211 target = ".config/sketchybar/items/spaces.sh";
212 text = ''
213 sketchybar --add event aerospace_workspace_change
214
215 sketchybar --add item aerospace_dummy left \
216 --set aerospace_dummy display=0 \
217 script="$PLUGIN_DIR/spaces.sh" \
218 --subscribe aerospace_dummy aerospace_workspace_change
219
220 for m in $(aerospace list-monitors | awk '{print $1}'); do
221 for sid in $(aerospace list-workspaces --monitor $m); do
222 sketchybar --add space space.$sid left \
223 --set space.$sid space=$sid \
224 icon=$sid \
225 background.color=$TRANSPARENT \
226 label.color=$ACCENT_COLOR \
227 icon.color=$ACCENT_COLOR \
228 display=$m \
229 label.font="sketchybar-app-font:Regular:12.0" \
230 icon.font="SF Pro:Semibold:12.0" \
231 label.padding_right=10 \
232 label.y_offset=-1 \
233 click_script="$PLUGIN_DIR/space_click.sh $sid"
234
235 apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" |
236 awk -F '|' '{gsub(/^ *| *$/, "", $2); if (!seen[$2]++) print $2}')
237
238 icon_strip=""
239 if [ "''${apps}" != "" ]; then
240 while read -r app; do
241 icon_strip+=" $($PLUGIN_DIR/icons.sh "$app")"
242 done <<<"''${apps}"
243 else
244 icon_strip=" —"
10 { }
11 // lib.optionalAttrs host.darwin (
12 lib.attrsets.mapAttrs
13 (
14 file: value: (lib.attrsets.overrideExisting value { enable = config.shared.darwin.tiling.enable; })
15 )
16 {
17 sketchybarrc = {
18 executable = true;
19 target = ".config/sketchybar/sketchybarrc";
20 text = ''
21 #!/usr/bin/env sh
22
23 source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
24
25 ITEM_DIR="$HOME/.config/sketchybar/items" # Directory where the items are configured
26 PLUGIN_DIR="$HOME/.config/sketchybar/plugins" # Directory where all the plugin scripts are stored
27
28 FONT="SF Pro" # Needs to have Regular, Bold, Semibold, Heavy and Black variants
29 PADDINGS=3 # All paddings use this value (icon, label, background)
30
31
32 # Setting up the general bar appearance and default values
33 ${pkgs.sketchybar}/bin/sketchybar --bar height=40 \
34 blur_radius=30 \
35 position=top \
36 sticky=on \
37 padding_left=10 \
38 padding_right=10
39
40
41 ${pkgs.sketchybar}/bin/sketchybar --default icon.font="SF Pro:Semibold:12.0" \
42 icon.color=$ITEM_COLOR \
43 label.font="SF Pro:Semibold:12.0" \
44 label.color=$ITEM_COLOR \
45 background.color=$ACCENT_COLOR \
46 background.corner_radius=10 \
47 background.height=20 \
48 padding_left=4 \
49 padding_right=4 \
50 icon.padding_left=6 \
51 icon.padding_right=3 \
52 label.padding_left=3 \
53 label.padding_right=6
54
55
56 # Left
57 # source "$ITEM_DIR/apple.sh"
58 source "$ITEM_DIR/spaces.sh"
59 source "$ITEM_DIR/front_app.sh"
60
61 # Center
62 # source "$ITEM_DIR/spotify.sh"
63 source "$ITEM_DIR/calendar.sh"
64
65 # Right
66 source $ITEM_DIR/calendar.sh
67 source $ITEM_DIR/wifi.sh
68 source $ITEM_DIR/battery.sh
69 source $ITEM_DIR/volume.sh
70
71 # Forcing all item scripts to run (never do this outside of sketchybarrc)
72 ${pkgs.sketchybar}/bin/sketchybar --update
73
74 echo "sketchybar configuation loaded.."
75 '';
76 };
77 icons = {
78 executable = true;
79 target = ".config/sketchybar/plugins/icons.sh";
80 text = ''
81 #!/usr/bin/env sh
82
83 # Source the icon map with all the application icons
84 source ${pkgs.sketchybar-app-font}/bin/icon_map.sh
85
86 # Create a cache directory if it doesn't exist
87 CACHE_DIR="$HOME/.cache/sketchybar"
88 mkdir -p "$CACHE_DIR"
89
90 # Cache file for icon mappings
91 ICON_CACHE="$CACHE_DIR/icon_cache.txt"
92
93 # Create the cache file if it doesn't exist
94 if [ ! -f "$ICON_CACHE" ]; then
95 touch "$ICON_CACHE"
24596 fi
24697
247 sketchybar --set space.$sid label="$icon_strip"
248
249 done
250
251 for empty_space in $(aerospace list-workspaces --monitor $m --empty); do
252 sketchybar --set space.$empty_space display=0
253 done
254 for focus in $(aerospace list-workspaces --focused); do
255 sketchybar --set space.$focus background.drawing=on \
256 background.color=$ACCENT_COLOR \
257 label.color=$ITEM_COLOR \
258 icon.color=$ITEM_COLOR
259 done
260 done
261 '';
262 };
263
264 items_volume = {
265 executable = true;
266 target = ".config/sketchybar/items/volume.sh";
267 text = ''
268 #/usr/bin/env sh
269
270 sketchybar --add item volume right \
271 --set volume script="$PLUGIN_DIR/volume.sh" \
272 --subscribe volume volume_change
273 '';
274 };
275 plugins_wifi = {
276 executable = true;
277 target = ".config/sketchybar/plugins/wifi.sh";
278 text = ''
279 #/usr/bin/env sh
280
281 SSID=$(system_profiler SPAirPortDataType | awk '/Current Network Information:/ { getline; print substr($0, 13, (length($0) - 13)); exit }')
282
283 if [ "$SSID" = "" ]; then
284 sketchybar --set $NAME icon="􀙈" label="Disconnected"
285 else
286 sketchybar --set $NAME icon="􀙇" label="$SSID"
287 fi
288
289 '';
290 };
291 plugins_calendar = {
292 executable = true;
293 target = ".config/sketchybar/plugins/calendar.sh";
294
295 text = ''
296 #/usr/bin/env sh
297
298 sketchybar --set $NAME label="$(date +'%a %d %b %I:%M %p')"
299 '';
300 };
301 plugins_spaces = {
302 executable = true;
303 target = ".config/sketchybar/plugins/spaces.sh";
304 text = ''
305 #!/usr/bin/env sh
306
307 source "$CONFIG_DIR/colors.sh"
308
309 update_workspace_appearance() {
310 local sid=$1
311 local is_focused=$2
312
313 if [ "$is_focused" = "true" ]; then
314 sketchybar --set space.$sid background.drawing=on \
315 background.color=$ACCENT_COLOR \
316 label.color=$ITEM_COLOR \
317 icon.color=$ITEM_COLOR
318 else
319 sketchybar --set space.$sid background.drawing=off \
320 label.color=$ACCENT_COLOR \
321 icon.color=$ACCENT_COLOR
322 fi
323 }
324
325 update_icons() {
326 m=$1
327 sid=$2
328
329 apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" \
330 | awk -F '|' '{gsub(/^ *| *$/, "", $2); if (!seen[$2]++) print $2}' \
331 | sort)
332
333 icon_strip=""
334 if [ "''${apps}" != "" ]; then
335 while read -r app; do
336 icon_strip+=" $($CONFIG_DIR/plugins/icons.sh "$app")"
337 done <<<"''${apps}"
338 else
339 icon_strip=" —"
340 fi
341
342 sketchybar --animate sin 10 --set space.$sid label="$icon_strip"
343 }
344
345 update_workspace_appearance "$PREV_WORKSPACE" "false"
346 update_workspace_appearance "$FOCUSED_WORKSPACE" "true"
347
348 for m in $(aerospace list-monitors | awk '{print $1}'); do
349 for sid in $(aerospace list-workspaces --monitor $m --visible); do
350 sketchybar --set space.$sid display=$m
351
352 update_icons "$m" "$sid"
353
354 update_icons "$m" "$PREV_WORKSPACE"
355
356 apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" | wc -l)
357 if [ "''${apps}" -eq 0 ]; then
358 sketchybar --set space.$sid display=0
98 # Check if the app is already in cache
99 APP_NAME=$(if [ "$1" = "Zen" ]; then echo "Zen Browser"; else echo "$1"; fi)
100
101 CACHED_ICON=$(grep "^$APP_NAME|" "$ICON_CACHE" | cut -d '|' -f2)
102
103 if [ -n "$CACHED_ICON" ]; then
104 # Cache hit, return the icon
105 echo "$CACHED_ICON"
106 exit 0
359107 fi
360 done
361 done
362 '';
363 };
364
365 plugins_space_click = {
366 executable = true;
367 target = ".config/sketchybar/plugins/space_click.sh";
368 text = ''
369 #/usr/bin/env/ sh
370
371 apps=$(aerospace list-windows --workspace $1 | awk -F '|' '{gsub(/^ *| *$/, "", $2); print $2}')
372 focused=$(aerospace list-workspaces --focused)
373
374 if [ "''${apps}" = "" ] && [ "''${focused}" != "$1" ]; then
375 sketchybar --set space.$1 display=0
376 else
377 aerospace workspace $1
378 fi
379 '';
380 };
381 plugins_volume = {
382 executable = true;
383 target = ".config/sketchybar/plugins/volume.sh";
384 text = ''
385 #!/usr/bin/env sh
386
387 # The volume_change event supplies a $INFO variable in which the current volume
388 # percentage is passed to the script.
389
390 if [ "$SENDER" = "volume_change" ]; then
391
392 VOLUME=$INFO
393
394 case $VOLUME in
395 [6-9][0-9] | 100)
396 ICON="􀊩"
397 ;;
398 [3-5][0-9])
399 ICON="􀊥"
400 ;;
401 [1-9] | [1-2][0-9])
402 ICON="􀊡"
403 ;;
404 *) ICON="􀊣" ;;
405 esac
406
407 sketchybar --set $NAME icon="$ICON" label="$VOLUME%"
408 fi
409 '';
410 };
411 plugins_front_app = {
412 executable = true;
413 target = ".config/sketchybar/plugins/front_app.sh";
414 text = ''
415 # Some events send additional information specific to the event in the $INFO
416 # variable. E.g. the front_app_switched event sends the name of the newly
417 # focused application in the $INFO variable:
418 # https://felixkratz.github.io/SketchyBar/config/events#events-and-scripting
419
420 app_switched() {
421 for m in $(aerospace list-monitors | awk '{print $1}'); do
422 for sid in $(aerospace list-workspaces --monitor $m --visible); do
423
424 apps=$( (echo "$INFO"; aerospace list-windows --monitor "$m" --workspace "$sid" \
425 | awk -F '|' '{gsub(/^ *| *$/, "", $2); print $2}') \
426 | awk '!seen[$0]++' | sort)
108
109 # Get icon from the mapping function
110 __icon_map "$APP_NAME"
111
112 if [ -n "$icon_result" ]; then
113 echo "$APP_NAME|$icon_result" >>"$ICON_CACHE"
114 fi
115
116 echo "$icon_result"
117 '';
118 };
119 colors = {
120 executable = true;
121 target = ".config/sketchybar/colors.sh";
122 text = ''
123
124 export TRANSPARENT=0x00ffffff
125
126 # -- Gray Scheme --
127 export ITEM_COLOR=0xff000000
128 export ACCENT_COLOR=0xffc3c6cb
129
130 # -- White Scheme --
131 # export ITEM_COLOR=0xff000000
132 # export ACCENT_COLOR=0xffffffff
133
134 # -- Teal Scheme --
135 # export ITEM_COLOR=0xff000000
136 # export ACCENT_COLOR=0xff2cf9ed
137
138 # -- Purple Scheme --
139 # export ITEM_COLOR=0xff000000
140 # export ACCENT_COLOR=0xffeb46f9
141
142 # -- Red Scheme ---
143 # export ITEM_COLOR=0xff000000
144 # export ACCENT_COLOR=0xffff2453
145
146 # -- Blue Scheme ---
147 # export ITEM_COLOR=0xff000000
148 # export ACCENT_COLOR=0xff15bdf9
149
150 # -- Green Scheme --
151 # export ITEM_COLOR=0xff000000
152 # export ACCENT_COLOR=0xff1dfca1
153
154 # -- Orange Scheme --
155 # export ITEM_COLOR=0xffffffff
156 # export ACCENT_COLOR=0xfff97716
157
158 # -- Yellow Scheme --
159 # export ITEM_COLOR=0xff000000
160 # export ACCENT_COLOR=0xfff7fc17
161 '';
162 };
163 items_wifi = {
164 executable = true;
165 target = ".config/sketchybar/items/wifi.sh";
166 text = ''
167 #!/usr/bin/env/ sh
168
169 sketchybar --add item wifi right \
170 --set wifi \
171 icon="􀙥" \
172 label="Updating..." \
173 script="$PLUGIN_DIR/wifi.sh" \
174 --subscribe wifi wifi_change
175 '';
176 };
177 items_battery = {
178 executable = true;
179 target = ".config/sketchybar/items/battery.sh";
180 text = ''
181 #!/usr/bin/env/ sh
182 sketchybar --add item battery right \
183 --set battery update_freq=180 \
184 script="$PLUGIN_DIR/battery.sh" \
185 --subscribe battery system_woke power_source_change
186 '';
187 };
188 items_calendar = {
189 executable = true;
190 target = ".config/sketchybar/items/calendar.sh";
191 text = ''
192 #!/usr/bin/env sh
193 sketchybar --add item calendar right \
194 --set calendar icon=ô€§ž \
195 update_freq=15 \
196 script="$PLUGIN_DIR/calendar.sh"
197 '';
198 };
199 items_front_app = {
200 executable = true;
201 target = ".config/sketchybar/items/front_app.sh";
202 text = ''
203 #!/usr/bin/env sh
204
205 sketchybar --add item front_app left \
206 --set front_app background.color=$ACCENT_COLOR \
207 icon.color=$ITEM_COLOR \
208 label.color=$ITEM_COLOR \
209 icon.font="sketchybar-app-font:Regular:12.0" \
210 label.font="SF Pro:Semibold:12.0" \
211 script="$PLUGIN_DIR/front_app.sh" \
212 --subscribe front_app front_app_switched
213 '';
214 };
215 items_spaces = {
216 executable = true;
217 target = ".config/sketchybar/items/spaces.sh";
218 text = ''
219 sketchybar --add event aerospace_workspace_change
220
221 sketchybar --add item aerospace_dummy left \
222 --set aerospace_dummy display=0 \
223 script="$PLUGIN_DIR/spaces.sh" \
224 --subscribe aerospace_dummy aerospace_workspace_change
225
226 for m in $(aerospace list-monitors | awk '{print $1}'); do
227 for sid in $(aerospace list-workspaces --monitor $m); do
228 sketchybar --add space space.$sid left \
229 --set space.$sid space=$sid \
230 icon=$sid \
231 background.color=$TRANSPARENT \
232 label.color=$ACCENT_COLOR \
233 icon.color=$ACCENT_COLOR \
234 display=$m \
235 label.font="sketchybar-app-font:Regular:12.0" \
236 icon.font="SF Pro:Semibold:12.0" \
237 label.padding_right=10 \
238 label.y_offset=-1 \
239 click_script="$PLUGIN_DIR/space_click.sh $sid"
240
241 apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" |
242 awk -F '|' '{gsub(/^ *| *$/, "", $2); if (!seen[$2]++) print $2}')
243
244 icon_strip=""
245 if [ "''${apps}" != "" ]; then
246 while read -r app; do
247 icon_strip+=" $($PLUGIN_DIR/icons.sh "$app")"
248 done <<<"''${apps}"
249 else
250 icon_strip=" —"
251 fi
252
253 sketchybar --set space.$sid label="$icon_strip"
254
255 done
256
257 for empty_space in $(aerospace list-workspaces --monitor $m --empty); do
258 sketchybar --set space.$empty_space display=0
259 done
260 for focus in $(aerospace list-workspaces --focused); do
261 sketchybar --set space.$focus background.drawing=on \
262 background.color=$ACCENT_COLOR \
263 label.color=$ITEM_COLOR \
264 icon.color=$ITEM_COLOR
265 done
266 done
267 '';
268 };
269
270 items_volume = {
271 executable = true;
272 target = ".config/sketchybar/items/volume.sh";
273 text = ''
274 #/usr/bin/env sh
275
276 sketchybar --add item volume right \
277 --set volume script="$PLUGIN_DIR/volume.sh" \
278 --subscribe volume volume_change
279 '';
280 };
281 plugins_wifi = {
282 executable = true;
283 target = ".config/sketchybar/plugins/wifi.sh";
284 text = ''
285 #/usr/bin/env sh
286
287 SSID=$(system_profiler SPAirPortDataType | awk '/Current Network Information:/ { getline; print substr($0, 13, (length($0) - 13)); exit }')
288
289 if [ "$SSID" = "" ]; then
290 sketchybar --set $NAME icon="􀙈" label="Disconnected"
291 else
292 sketchybar --set $NAME icon="􀙇" label="$SSID"
293 fi
294
295 '';
296 };
297 plugins_calendar = {
298 executable = true;
299 target = ".config/sketchybar/plugins/calendar.sh";
300
301 text = ''
302 #/usr/bin/env sh
303
304 sketchybar --set $NAME label="$(date +'%a %d %b %I:%M %p')"
305 '';
306 };
307 plugins_spaces = {
308 executable = true;
309 target = ".config/sketchybar/plugins/spaces.sh";
310 text = ''
311 #!/usr/bin/env sh
312
313 source "$CONFIG_DIR/colors.sh"
314
315 update_workspace_appearance() {
316 local sid=$1
317 local is_focused=$2
318
319 if [ "$is_focused" = "true" ]; then
320 sketchybar --set space.$sid background.drawing=on \
321 background.color=$ACCENT_COLOR \
322 label.color=$ITEM_COLOR \
323 icon.color=$ITEM_COLOR
324 else
325 sketchybar --set space.$sid background.drawing=off \
326 label.color=$ACCENT_COLOR \
327 icon.color=$ACCENT_COLOR
328 fi
329 }
330
331 update_icons() {
332 m=$1
333 sid=$2
334
335 apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" \
336 | awk -F '|' '{gsub(/^ *| *$/, "", $2); if (!seen[$2]++) print $2}' \
337 | sort)
427338
428339 icon_strip=""
429340 if [ "''${apps}" != "" ]; then
......@@ -435,101 +346,197 @@
435346 fi
436347
437348 sketchybar --animate sin 10 --set space.$sid label="$icon_strip"
349 }
350
351 update_workspace_appearance "$PREV_WORKSPACE" "false"
352 update_workspace_appearance "$FOCUSED_WORKSPACE" "true"
353
354 for m in $(aerospace list-monitors | awk '{print $1}'); do
355 for sid in $(aerospace list-workspaces --monitor $m --visible); do
356 sketchybar --set space.$sid display=$m
357
358 update_icons "$m" "$sid"
359
360 update_icons "$m" "$PREV_WORKSPACE"
361
362 apps=$(aerospace list-windows --monitor "$m" --workspace "$sid" | wc -l)
363 if [ "''${apps}" -eq 0 ]; then
364 sketchybar --set space.$sid display=0
365 fi
366 done
438367 done
439 done
440 }
441
442 if [ "$SENDER" = "front_app_switched" ]; then
443
444 sketchybar --set $NAME label="$INFO" icon="$($CONFIG_DIR/plugins/icons.sh "$INFO")"
445
446 app_switched
447 fi
448 '';
449 };
450 plugins_battery = {
451 executable = true;
452 target = ".config/sketchybar/plugins/battery.sh";
453 text = ''
454 #!/usr/bin/env sh
455 source "$CONFIG_DIR/colors.sh"
456
457 PERCENTAGE=$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)
458 CHARGING=$(pmset -g batt | grep 'AC Power')
459
460 if [ $PERCENTAGE = "" ]; then
461 exit 0
462 fi
463
464 case ''${PERCENTAGE} in
465 9[0-9] | 100)
466 ICON="􀛨"
467 COLOR=$ITEM_COLOR
468 ;;
469 [6-8][0-9])
470 ICON="􀺸"
471 COLOR=$ITEM_COLOR
472 ;;
473 [3-5][0-9])
474 ICON="􀺶"
475 COLOR="0xFFd97706"
476 ;;
477 [1-2][0-9])
478 ICON="􀛩"
479 COLOR="0xFFf97316"
480 ;;
481 *)
482 ICON="􀛪"
483 COLOR="0xFFef4444"
484 ;;
485 esac
486
487 if [[ $CHARGING != "" ]]; then
488 ICON="􀢋"
489 COLOR=$ITEM_COLOR
490 fi
491
492 # The item invoking this script (name $NAME) will get its icon and label
493 # updated with the current battery status
494 sketchybar --set $NAME icon="$ICON" label="''${PERCENTAGE}%" icon.color="$COLOR"
495 '';
496 };
497 plugins_aerospace = {
498 executable = true;
499 target = ".config/sketchybar/plugins/aerospace.sh";
500 text = ''
501 #!/usr/bin/env bash
502 source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
503
504 highlight_focused_workspace() {
505 if [[ "$1" = "$FOCUSED_WORKSPACE" ]]
506 then
507 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=on label.width=0
508 else
509 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=off label.width=dynamic
510 fi
511 }
512
513 illuminate_mode() {
514 if [[ "$mode" = "service" ]]
515 then
516 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$ORANGE
517 elif [[ "$mode" = "resize" ]]
518 then
519 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$GREEN
520 else
521 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$BACKGROUND_1
522 fi
523 }
524 case "$SENDER" in
525 "aerospace_workspace_change")
526 highlight_focused_workspace $1
527 ;;
528 "aerospace_mode_change")
529 illuminate_mode
530 ;;
531 esac
532 '';
533 };
534 };
368 '';
369 };
370
371 plugins_space_click = {
372 executable = true;
373 target = ".config/sketchybar/plugins/space_click.sh";
374 text = ''
375 #/usr/bin/env/ sh
376
377 apps=$(aerospace list-windows --workspace $1 | awk -F '|' '{gsub(/^ *| *$/, "", $2); print $2}')
378 focused=$(aerospace list-workspaces --focused)
379
380 if [ "''${apps}" = "" ] && [ "''${focused}" != "$1" ]; then
381 sketchybar --set space.$1 display=0
382 else
383 aerospace workspace $1
384 fi
385 '';
386 };
387 plugins_volume = {
388 executable = true;
389 target = ".config/sketchybar/plugins/volume.sh";
390 text = ''
391 #!/usr/bin/env sh
392
393 # The volume_change event supplies a $INFO variable in which the current volume
394 # percentage is passed to the script.
395
396 if [ "$SENDER" = "volume_change" ]; then
397
398 VOLUME=$INFO
399
400 case $VOLUME in
401 [6-9][0-9] | 100)
402 ICON="􀊩"
403 ;;
404 [3-5][0-9])
405 ICON="􀊥"
406 ;;
407 [1-9] | [1-2][0-9])
408 ICON="􀊡"
409 ;;
410 *) ICON="􀊣" ;;
411 esac
412
413 sketchybar --set $NAME icon="$ICON" label="$VOLUME%"
414 fi
415 '';
416 };
417 plugins_front_app = {
418 executable = true;
419 target = ".config/sketchybar/plugins/front_app.sh";
420 text = ''
421 # Some events send additional information specific to the event in the $INFO
422 # variable. E.g. the front_app_switched event sends the name of the newly
423 # focused application in the $INFO variable:
424 # https://felixkratz.github.io/SketchyBar/config/events#events-and-scripting
425
426 app_switched() {
427 for m in $(aerospace list-monitors | awk '{print $1}'); do
428 for sid in $(aerospace list-workspaces --monitor $m --visible); do
429
430 apps=$( (echo "$INFO"; aerospace list-windows --monitor "$m" --workspace "$sid" \
431 | awk -F '|' '{gsub(/^ *| *$/, "", $2); print $2}') \
432 | awk '!seen[$0]++' | sort)
433
434 icon_strip=""
435 if [ "''${apps}" != "" ]; then
436 while read -r app; do
437 icon_strip+=" $($CONFIG_DIR/plugins/icons.sh "$app")"
438 done <<<"''${apps}"
439 else
440 icon_strip=" —"
441 fi
442
443 sketchybar --animate sin 10 --set space.$sid label="$icon_strip"
444 done
445 done
446 }
447
448 if [ "$SENDER" = "front_app_switched" ]; then
449
450 sketchybar --set $NAME label="$INFO" icon="$($CONFIG_DIR/plugins/icons.sh "$INFO")"
451
452 app_switched
453 fi
454 '';
455 };
456 plugins_battery = {
457 executable = true;
458 target = ".config/sketchybar/plugins/battery.sh";
459 text = ''
460 #!/usr/bin/env sh
461 source "$CONFIG_DIR/colors.sh"
462
463 PERCENTAGE=$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)
464 CHARGING=$(pmset -g batt | grep 'AC Power')
465
466 if [ $PERCENTAGE = "" ]; then
467 exit 0
468 fi
469
470 case ''${PERCENTAGE} in
471 9[0-9] | 100)
472 ICON="􀛨"
473 COLOR=$ITEM_COLOR
474 ;;
475 [6-8][0-9])
476 ICON="􀺸"
477 COLOR=$ITEM_COLOR
478 ;;
479 [3-5][0-9])
480 ICON="􀺶"
481 COLOR="0xFFd97706"
482 ;;
483 [1-2][0-9])
484 ICON="􀛩"
485 COLOR="0xFFf97316"
486 ;;
487 *)
488 ICON="􀛪"
489 COLOR="0xFFef4444"
490 ;;
491 esac
492
493 if [[ $CHARGING != "" ]]; then
494 ICON="􀢋"
495 COLOR=$ITEM_COLOR
496 fi
497
498 # The item invoking this script (name $NAME) will get its icon and label
499 # updated with the current battery status
500 sketchybar --set $NAME icon="$ICON" label="''${PERCENTAGE}%" icon.color="$COLOR"
501 '';
502 };
503 plugins_aerospace = {
504 executable = true;
505 target = ".config/sketchybar/plugins/aerospace.sh";
506 text = ''
507 #!/usr/bin/env bash
508 source "$HOME/.config/sketchybar/colors.sh" # Loads all defined colors
509
510 highlight_focused_workspace() {
511 if [[ "$1" = "$FOCUSED_WORKSPACE" ]]
512 then
513 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=on label.width=0
514 else
515 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME icon.highlight=off label.width=dynamic
516 fi
517 }
518
519 illuminate_mode() {
520 if [[ "$mode" = "service" ]]
521 then
522 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$ORANGE
523 elif [[ "$mode" = "resize" ]]
524 then
525 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$GREEN
526 else
527 ${pkgs.sketchybar}/bin/sketchybar --animate tanh 20 --set $NAME background.color=$BACKGROUND_1
528 fi
529 }
530 case "$SENDER" in
531 "aerospace_workspace_change")
532 highlight_focused_workspace $1
533 ;;
534 "aerospace_mode_change")
535 illuminate_mode
536 ;;
537 esac
538 '';
539 };
540 }
541 );
535542}
modules/macos/system.nix+4-2
......@@ -4,9 +4,11 @@
44 pkgs,
55 lib,
66 ...
7}: let
7}:
8let
89 tiling = config.shared.darwin.tiling.enable;
9in {
10in
11{
1012 # Use touchid or watch to activate sudo
1113 security.pam.services.sudo_local = {
1214 enable = true;
modules/neovim/default.nix+4-1
......@@ -170,7 +170,10 @@
170170 }
171171 ];
172172 };
173 image.enable = true;
173 image = {
174 enable = true;
175 math.enabled = false;
176 };
174177 notifier.timeout = 3000;
175178 picker = {
176179 enable = true;
modules/nixos/services.nix+1
......@@ -24,6 +24,7 @@
2424
2525 desktopManager.cosmic.enable = true;
2626 displayManager.cosmic-greeter.enable = true;
27 desktopManager.cosmic.xwayland.enable = true;
2728
2829 # Auto mount devices
2930 udisks2 = {
modules/shared/nix.nix+2-3
......@@ -1,4 +1,5 @@
1{inputs, ...}: {
1{ inputs, ... }:
2{
23 nixpkgs.config = {
34 allowUnfree = true;
45 };
......@@ -24,13 +25,11 @@
2425 "https://cache.nixos.org/?priority=10"
2526
2627 "https://nix-community.cachix.org"
27 "https://cosmic.cachix.org/"
2828 # For haskell
2929 "https://cache.iog.io"
3030 ];
3131 trusted-public-keys = [
3232 "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
33 "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
3433 # For haskell
3534 "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
3635 ];
modules/shared/user-system-settings.nix-23
......@@ -19,27 +19,4 @@
1919 BROWSER = user.browser;
2020 };
2121
22 stylix = lib.mkIf (user ? "theme" && user.theme != null) {
23 enable = false;
24 base16Scheme = "${pkgs.base16-schemes}/share/themes/${user.theme}.yaml";
25
26 fonts = lib.optionalAttrs (user ? "font") {
27 serif = {
28 package = pkgs.nerd-fonts.${user.font};
29 name = "${user.font} Nerd Font";
30 };
31 sansSerif = {
32 package = pkgs.nerd-fonts.${user.font};
33 name = "${user.font} Nerd Font";
34 };
35 monospace = {
36 package = pkgs.nerd-fonts.${user.font};
37 name = "${user.font} Nerd Font";
38 };
39 emoji = {
40 package = pkgs.twemoji-color-font;
41 name = "Twemoji Color";
42 };
43 };
44 };
4522}
users/natalie/desktop/configuration.nix+4-3
......@@ -84,8 +84,6 @@
8484 hybrid-sleep.enable = false;
8585 };
8686
87 packages = [ pkgs.observatory ];
88
8987 services.monitord.wantedBy = [ "multi-user.target" ];
9088 };
9189
......@@ -148,7 +146,10 @@
148146 ];
149147 };
150148 environment = {
151 sessionVariables.COSMIC_DATA_CONTROL_ENABLED = 1;
149 sessionVariables = {
150 COSMIC_DATA_CONTROL_ENABLED = 1;
151 NIXOS_OZONE_WL = "1";
152 };
152153 variables.EDITOR = "nvim";
153154
154155 systemPackages = with pkgs; [
users/natalie/desktop/home.nix+3-1
......@@ -8,6 +8,7 @@
88 ...
99}:
1010{
11 programs.mangohud.enable = true;
1112 home = {
1213 stateVersion = "23.05"; # Please read the comment before changing.
1314
......@@ -29,6 +30,7 @@
2930 wineWowPackages.stable
3031 winetricks
3132 (prismlauncher.override { gamemodeSupport = true; })
33 umu-launcher
3234
3335 #window manager stuff
3436 wofi
......@@ -50,8 +52,8 @@
5052 signal-desktop
5153 inputs.zls.packages.x86_64-linux.zls
5254 rust-bin.stable.latest.default
55 inputs.zen-browser.packages.x86_64-linux.default
5356 ];
54 # programs.mangohud.enable = true;
5557 };
5658
5759 # xdg.mimeApps.defaultApplications."inode/directory" = "dolphin.desktop";
users/natalie/home.nix+2-1
......@@ -2,7 +2,8 @@
22 pkgs,
33 lib,
44 ...
5} @ args: {
5}@args:
6{
67 programs = {
78 # sort-lines:start
89 atuin.enable = true;
users/natalie/laptop/configuration.nix+5-2
......@@ -1,4 +1,5 @@
1{pkgs, ...}: {
1{ pkgs, ... }:
2{
23 environment.systemPackages = with pkgs; [
34 pinentry_mac
45 ];
......@@ -6,9 +7,11 @@
67 # Custom configuration modules in "modules" are shared between users,
78 # and can be configured in this "shared" namespace
89 shared.darwin = {
9 macAppStoreApps = ["wireguard"];
10 macAppStoreApps = [ "wireguard" ];
1011 };
1112
13 system.defaults.NSGlobalDomain."com.apple.trackpad.scaling" = 1.0;
14
1215 # Create /etc/zshrc that loads the nix-darwin environment.
1316 programs = {
1417 gnupg.agent.enable = true;
users/natalie/laptop/home.nix+5
......@@ -15,5 +15,10 @@
1515 sessionPath = [
1616 "$HOME/.emacs.d/bin"
1717 ];
18
19 packages = with pkgs; [
20 #PDF viewer for VimTeX
21 skimpdf
22 ];
1823 };
1924}
users/natalie/packages.nix+7-15
......@@ -1,6 +1,7 @@
11# Packages installed with home-manager
2{pkgs, ...}:
3with pkgs; [
2{ pkgs, ... }:
3with pkgs;
4[
45 #general development
56 just
67 pkg-config
......@@ -23,6 +24,7 @@ with pkgs; [
2324 qemu
2425 podman
2526 docker
27 devenv
2628
2729 #productivity
2830 glance
......@@ -33,9 +35,10 @@ with pkgs; [
3335 #nix tools
3436 direnv
3537 nh
38 (lix.override { aws-sdk-cpp = null; })
3639
3740 #terminal stuff
38 (btop.override {cudaSupport = true;})
41 (btop.override { cudaSupport = true; })
3942 tmux
4043 zellij
4144 lazygit
......@@ -62,15 +65,9 @@ with pkgs; [
6265
6366 #media
6467 spotify
65 zathura
6668
6769 #language servers
6870 typst-live
69 lua-language-server
70 nil
71 nixd
72 texlab
73 texlivePackages.chktex
7471
7572 #formatters/linters
7673 stylua
......@@ -79,14 +76,10 @@ with pkgs; [
7976
8077 #neovim deps
8178 # TODO: from clo, maybe u can remove all of these? i don't wanna break tho
82 lua51Packages.lua
83 lua51Packages.luarocks-nix
84 codespell
8579 tree-sitter
86
80 zathura
8781 #python
8882 pyright
89 basedpyright
9083 ruff
9184 python312Packages.python
9285 python312Packages.pynvim
......@@ -107,7 +100,6 @@ with pkgs; [
107100
108101 #math
109102 texlive.combined.scheme-full
110 zathura
111103
112104 #fun things
113105 cowsay
users/natalie/user.nix+2-2
......@@ -3,11 +3,11 @@ rec {
33 name = "Natalie"; # name/identifier
44 email = "nmarks413@gmail.com"; # email (used for certain configurations)
55 dotfilesDir = "~/.dotfiles"; # absolute path of the local repo
6 theme = "catppuccin-mocha"; # name of theme that stylix will use
6 theme = null; # name of theme that stylix will use
77 browser = "firefox"; # Default browser; must select one from ./user/app/browser/
88 term = "ghostty"; # Default terminal command;
99 font = "iosevka"; # Selected font
10 editor = "neovim"; # Default editor;
10 editor = "nvim"; # Default editor;
1111 timeZone = "America/Los_Angeles";
1212 sexuality = "bisexual";
1313}
users/natalie/vim.nix+49-1
......@@ -1,8 +1,14 @@
1{pkgs, ...}: {
1{ pkgs, ... }:
2{
23 imports = [
34 ./vim/default.nix
45 ];
6
57 vim = {
8 #enable python provider
9 withPython3 = true;
10 python3Packages = [ "pynvim" ];
11
612 options = {
713 tabstop = 2;
814 softtabstop = 2;
......@@ -14,10 +20,52 @@
1420 foldcolumn = "1";
1521 foldlevelstart = 99;
1622 foldenable = true;
23 foldmethod = "expr";
24 #Default to treesitter folding
25 foldexpr = "v:lua.vim.treesitter.foldexpr()";
1726 };
1827
1928 autocmds = [
29 #Autocommand to fall back to treesitter folding if LSP doesnt support it
30 {
31 event = [ "LspAttach" ];
32 callback = pkgs.lib.generators.mkLuaInline ''
33 function(args)
34 local client = vim.lsp.get_client_by_id(args.data.client_id)
35 if client:supports_method('textDocument/foldingRange') then
36 local win = vim.api.nvim_get_current_win()
37 vim.wo[win][0].foldexpr = 'v:lua.vim.lsp.foldexpr()'
38 end
39 end
40 '';
41 }
2042 ];
43
44 tabline = {
45 nvimBufferline.enable = true;
46 };
47 # nvf versions is VERY outdated
48 # pluginOverrides = {
49 # hardtime-nvim = pkgs.fetchFromGitHub {
50 # owner = "m4xshen";
51 # repo = "hardtime.nvim";
52 # rev = "v1.0.1";
53 # hash = "sha256-5tqiSuGvBJcr8l6anEBojXEaaxFS1P5T1ROr46ylVhk=";
54 # };
55 # };
56 startPlugins = [
57 "nui-nvim"
58 ];
59 binds = {
60 hardtime-nvim = {
61 enable = false;
62 setupOpts = {
63 disable_mouse = false;
64 restriction_mode = "warn";
65 };
66 };
67 };
68
2169 theme = {
2270 name = "catppuccin";
2371 style = "mocha";
users/natalie/vim/coq.nix created+16
......@@ -0,0 +1,16 @@
1{ pkgs, ... }:
2{
3
4 vim = {
5 # extraPackages = with pkgs; [
6 # coq_8_20
7 # coqPackages_8_20.stdlib
8 # ];
9 extraPlugins.Coqtail = {
10 # enabled = true;
11 package = pkgs.vimPlugins.Coqtail;
12 # lazy = true;
13 # ft = "coq";
14 };
15 };
16}
users/natalie/vim/default.nix+6-2
......@@ -1,8 +1,12 @@
1{...}: {
1{ ... }:
2{
23 imports = [
34 ./keybinds.nix
45 ./languages.nix
56 ./latex.nix
7 ./lean.nix
8 ./coq.nix
9 ./visuals.nix
10 ./mini.nix
611 ];
7
812}
users/natalie/vim/keybinds.nix-1
......@@ -19,7 +19,6 @@ in
1919 (mkKeymap "n" "<leader>ff" ":lua require('snacks').picker.files()<CR>" "Find File")
2020 (mkKeymap "n" "<leader>fg" ":lua require('snacks').picker.grep()<CR>" "Grep Files")
2121 # Lsp
22 (mkKeymap "n" "K" ":Lspsaga hover_doc<CR>" "Hover docs")
2322 (mkKeymap "n" "lr" ":lua vim.lsp.buf.rename()<CR>" "Rename")
2423 # (mkKeymap "n" "<leader>th" ":lua function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) end<CR>" "Toggle Inlay Hints")
2524 ];
users/natalie/vim/languages.nix+98-52
......@@ -4,58 +4,59 @@
44 host,
55 pkgs,
66 ...
7}: let
8 darwin =
9 if host.darwin
10 then "darwin"
11 else "nixos";
12 flakePath = "/${
13 if host.darwin
14 then "Users"
15 else "home"
16 }/${user.username}/.dotfiles";
17
18 # BIG HACK DO NOT DO PLS
19
20 hostname =
21 if host.darwin
22 then "Natalies-MacBook-Air"
23 else "nixos";
24in {
7}:
8{
259 vim = {
2610 extraPackages = with pkgs; [
2711 python312Packages.pylatexenc
12 nixd
2813 ];
2914 lsp = {
15 formatOnSave = true;
3016 lightbulb.enable = false;
31 lspsaga = {
32 enable = true;
33 setupOpts = {
34 lightbulb = {
35 virtual_text = false;
17 # lspsaga = {
18 # enable = true;
19 # setupOpts = {
20 # lightbulb = {
21 # virtual_text = false;
22 # };
23 # };
24 # };
25 inlayHints.enable = true;
26 servers = {
27 nil = {
28 settings.nil.nix.flake = {
29
30 autoArchive = true;
31 autoEvalInputs = true;
32
3633 };
3734 };
38 };
39 nvim-docs-view.enable = true;
40 inlayHints.enable = true;
41 servers.nixd.settings.nixd = {
42 nixpkgs.expr = ''import "<nixpkgs>" { }'';
43 options =
44 {
45 home-manager = {
46 expr = ''(builtins.getFlake "${flakePath}").${darwin}Configurations.${hostname}.options.home-manager.users.type.getSubOptions [ ]'';
47 };
48 }
49 // pkgs.lib.optionalAttrs host.darwin {
50 nix-darwin = {
51 expr = ''(builtins.getFlake "${flakePath}").darwinConfigurations.${hostname}.options'';
52 };
53 }
54 // pkgs.lib.optionalAttrs host.linux {
55 nixos = {
56 expr = ''(builtins.getFlake "${flakePath}").nixosConfigurations.${hostname}.options'';
57 };
35 nixd = {
36 settings.nixd = {
37 nixpkgs.expr = ''import "${flake.inputs.nixpkgs}" { }'';
38
39 options =
40 {
41 home-manager = {
42 expr = ''(let pkgs = import "${flake.inputs.nixpkgs}" { }; lib = import "${flake.inputs.home-manager}/modules/lib/stdlib-extended.nix" pkgs.lib; in (lib.evalModules { modules = (import "${flake.inputs.home-manager}/modules/modules.nix") { inherit lib pkgs;check = false;}; })).options'';
43 # (builtins.getFlake "${flakePath}").${darwin}Configurations.${hostname}.options.home-manager.users.type.getSubOptions [ ]'';
44 };
45 }
46 // pkgs.lib.optionalAttrs host.darwin {
47 nix-darwin = {
48 expr = ''(let pkgs = import "${flake.inputs.nixpkgs}" { }; in (pkgs.lib.evalModules { modules = (import "${flake.inputs.darwin}/modules/module-list.nix"); check = false;})).options'';
49 # (builtins.getFlake "${flakePath}").darwinConfigurations.${hostname}.options'';
50 };
51 }
52 // pkgs.lib.optionalAttrs host.linux {
53 nixos = {
54 expr = ''(let pkgs = import "${flake.inputs.nixpkgs}" { }; in (pkgs.lib.evalModules { modules = (import "${flake.inputs.nixpkgs}/nixos/modules/module-list.nix"); check = false;})).options'';
55 # (builtins.getFlake "${flakePath}").nixosConfigurations.${hostname}.options'';
56 };
57 };
5858 };
59 };
5960 };
6061 mappings = {
6162 codeAction = "<leader>ca";
......@@ -63,7 +64,7 @@ in {
6364 goToDefinition = "gd";
6465 listReferences = "gr";
6566 goToType = "gy";
66 hover = null;
67 hover = "K";
6768 nextDiagnostic = "<leader>d";
6869 openDiagnosticFloat = "<leader>df";
6970 renameSymbol = "rn";
......@@ -88,24 +89,42 @@ in {
8889 enable = true;
8990 };
9091 };
92 nix.format.enable = true;
9193 };
9294
9395 formatter.conform-nvim = {
9496 enable = true;
9597 setupOpts = {
9698 formatters_by_ft = {
97 fish = ["fish_indent"];
98 tex = ["latexindent"];
99 fish = [ "fish_indent" ];
100 tex = [ "latexindent" ];
99101 };
100102 };
101103 };
102
103 diagnostics.nvim-lint = {
104 diagnostics = {
104105 enable = true;
105 linters_by_ft = {
106 nix = ["statix"];
107 tex = ["chktex"];
108 haskell = ["hlint"];
106 config = {
107 virtual_text = {
108 format = pkgs.lib.generators.mkLuaInline ''
109 function(diagnostic)
110 return string.format("%s (%s)", diagnostic.message, diagnostic.source)
111 end
112 '';
113 };
114 };
115 nvim-lint = {
116 enable = true;
117 linters_by_ft = {
118 nix = [ "statix" ];
119 tex = [ "chktex" ];
120 haskell = [ "hlint" ];
121 };
122
123 linters = {
124 chktex = {
125 ignore_exitcode = true;
126 };
127 };
109128 };
110129 };
111130 treesitter = {
......@@ -167,5 +186,32 @@ in {
167186 };
168187 };
169188 };
189
190 lazy.plugins."blink.pairs" = {
191 enabled = true;
192 package = pkgs.vimPlugins.blink-pairs;
193 setupModule = "blink.pairs";
194 setupOpts = {
195 mappings = {
196 # -- you can call require("blink.pairs.mappings").enable() and require("blink.pairs.mappings").disable() to enable/disable mappings at runtime
197 enabled = true;
198 # -- see the defaults: https://github.com/Saghen/blink.pairs/blob/main/lua/blink/pairs/config/mappings.lua#L10
199 pairs = [ ];
200 };
201 highlights = {
202 enabled = true;
203 groups = [
204 "BlinkPairsOrange"
205 "BlinkPairsPurple"
206 "BlinkPairsBlue"
207 ];
208 matchparen = {
209 enabled = true;
210 group = "MatchParen";
211 };
212 };
213 debug = false;
214 };
215 };
170216 };
171217}
users/natalie/vim/latex.nix+67-7
......@@ -1,22 +1,29 @@
1{pkgs, ...}: {
1{ pkgs, host, ... }:
2{
23 vim = {
4 lazy.plugins.cmp-vimtex = {
5 enabled = true;
6 package = pkgs.vimPlugins.cmp-vimtex;
7 lazy = false;
8
9 };
310 lazy.plugins.vimtex = {
411 enabled = true;
512 package = pkgs.vimPlugins.vimtex;
6 lazy = true;
7 ft = "tex";
13 lazy = false;
814 };
915
1016 globals = {
1117 tex_flavor = "latex";
1218 maplocalleader = "\\";
1319 vimtex_compiler_method = "latexmk";
14 vimtex_view_method = "zathura";
20 vimtex_view_method = if host.darwin then "skim" else "zathura";
21 vimtex_view_automatic = 1;
1522 vimtex_compiler_latexmk = {
1623 callback = 1;
1724 continuous = 1;
1825 executable = "latexmk";
19 hooks = [];
26 hooks = [ ];
2027 options = [
2128 "-verbose"
2229 "-file-line-error"
......@@ -37,12 +44,65 @@
3744 ];
3845 };
3946
47 autocomplete.blink-cmp = {
48 sourcePlugins = {
49 "blink.compat" = {
50 enable = true;
51 package = "blink-compat";
52 module = "blink.compat.source";
53 };
54 };
55 setupOpts = {
56 sources = {
57 default = [ "vimtex" ];
58 providers = {
59 vimtex = {
60 name = "vimtex";
61 module = "blink.compat.source";
62 score_offset = 100;
63 };
64 };
65 };
66 };
67 };
68
69 augroups = [
70 {
71 name = "VimTeX Events";
72 }
73 ];
74 autocmds = [
75 {
76 pattern = [ "VimtexEventViewReverse" ];
77 event = [ "User" ];
78 desc = "Return to nvim after reverse search";
79 command = "call b:vimtex.viewer.xdo_focus_vim()";
80 group = "VimTeX Events";
81 }
82 {
83 pattern = [ "VimtexEventQuit" ];
84 event = [ "User" ];
85 desc = "Close pdf after exiting nvim";
86 command = "VimtexClean";
87 group = "VimTeX Events";
88 }
89
90 {
91 pattern = [ "VimtexEventInitPost" ];
92 event = [ "User" ];
93 desc = "Start compiling when opening nvim to a tex file";
94 command = "VimtexCompile";
95 group = "VimTeX Events";
96 }
97
98 ];
99
40100 lsp = {
41101 servers = {
42102 texlab = {
43103 enable = true;
44 cmd = ["${pkgs.texlab}/bin/texlab"];
45 filetypes = ["tex"];
104 cmd = [ "${pkgs.texlab}/bin/texlab" ];
105 filetypes = [ "tex" ];
46106 };
47107 };
48108 };
users/natalie/vim/lean.nix created+11
......@@ -0,0 +1,11 @@
1{ pkgs, ... }:
2{
3 vim = {
4 lazy.plugins."lean.nvim" = {
5 enabled = true;
6 package = pkgs.vimPlugins.lean-nvim;
7 lazy = true;
8 ft = "lean";
9 };
10 };
11}
users/natalie/vim/mini.nix created+9
......@@ -0,0 +1,9 @@
1{ pkgs, ... }:
2{
3 vim = {
4 mini = {
5 icons.enable = true;
6 ai.enable = true;
7 };
8 };
9}
users/natalie/vim/visuals.nix created+38
......@@ -0,0 +1,38 @@
1{ pkgs, ... }:
2{
3 vim = {
4 visuals = {
5 indent-blankline = {
6 enable = true;
7 };
8 };
9 ui = {
10 noice = {
11 enable = true;
12 setupOpts = {
13 lsp = {
14 progress.enabled = false;
15 signature.enabled = true;
16 };
17 presets = {
18 lsp_doc_border = true;
19 long_message_to_split = true;
20 inc_rename = false;
21 command_palette = false;
22 bottom_search = true;
23 };
24 };
25 };
26 borders = {
27 enable = true;
28 };
29 };
30
31 # Better help docs
32 lazy.plugins."helpview.nvim" = {
33 enabled = true;
34 package = pkgs.vimPlugins.helpview-nvim;
35 lazy = false;
36 };
37 };
38}