My NixOS configuration (mirror)

feat: home manager overhaul (#7)

authored by

Matthew Hrehirchuk and committed by
GitHub
c99bd7fc ab86aa0f

+1617 -1296
+2 -2
README.md
··· 14 14 |-------------------|----------------------|-------------------------------| 15 15 | **DE / WM** | KDE Plasma 6 | Niri | 16 16 | **Notifications** | | Dunst | 17 - | **Bar** | | Waybar | 18 - | **Launcher** | Fuzzel | Fuzzel | 17 + | **Bar** | | Custom Quickshell | 18 + | **Launcher** | Fuzzel | Vicinae | 19 19 | **Shell** | fish + Pure Prompt | fish + Pure Prompt | 20 20 | **Editor** | VSCode + NVF | VSCode + NVF | 21 21 | **Terminal** | Ghostty | Ghostty |
+117 -77
flake.lock
··· 1 1 { 2 2 "nodes": { 3 + "crane": { 4 + "locked": { 5 + "lastModified": 1754269165, 6 + "narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=", 7 + "owner": "ipetkov", 8 + "repo": "crane", 9 + "rev": "444e81206df3f7d92780680e45858e31d2f07a08", 10 + "type": "github" 11 + }, 12 + "original": { 13 + "owner": "ipetkov", 14 + "repo": "crane", 15 + "type": "github" 16 + } 17 + }, 3 18 "dustpan": { 4 19 "inputs": { 5 20 "home-manager": "home-manager", ··· 38 53 "flake-compat_2": { 39 54 "flake": false, 40 55 "locked": { 41 - "lastModified": 1747046372, 42 - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", 56 + "lastModified": 1761588595, 57 + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", 43 58 "owner": "edolstra", 44 59 "repo": "flake-compat", 45 - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", 60 + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", 46 61 "type": "github" 47 62 }, 48 63 "original": { ··· 107 122 ] 108 123 }, 109 124 "locked": { 110 - "lastModified": 1759362264, 111 - "narHash": "sha256-wfG0S7pltlYyZTM+qqlhJ7GMw2fTF4mLKCIVhLii/4M=", 125 + "lastModified": 1760948891, 126 + "narHash": "sha256-TmWcdiUUaWk8J4lpjzu4gCGxWY6/Ok7mOK4fIFfBuU4=", 112 127 "owner": "hercules-ci", 113 128 "repo": "flake-parts", 114 - "rev": "758cf7296bee11f1706a574c77d072b8a7baa881", 129 + "rev": "864599284fc7c0ba6357ed89ed5e2cd5040f0c04", 115 130 "type": "github" 116 131 }, 117 132 "original": { ··· 175 190 "type": "github" 176 191 } 177 192 }, 178 - "flake-utils_3": { 179 - "inputs": { 180 - "systems": "systems_5" 181 - }, 182 - "locked": { 183 - "lastModified": 1731533236, 184 - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 185 - "owner": "numtide", 186 - "repo": "flake-utils", 187 - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 188 - "type": "github" 189 - }, 190 - "original": { 191 - "owner": "numtide", 192 - "repo": "flake-utils", 193 - "type": "github" 194 - } 195 - }, 196 193 "ghostty": { 197 194 "inputs": { 198 195 "flake-compat": "flake-compat", ··· 204 201 "zon2nix": "zon2nix" 205 202 }, 206 203 "locked": { 207 - "lastModified": 1760279514, 208 - "narHash": "sha256-2RBHztup6ArjsrM4jeFiC8YSezR8fibezf8WN06/eXo=", 204 + "lastModified": 1764339838, 205 + "narHash": "sha256-JfC8yW84+cFTp6082MdXtCAc7I3h9P4tGJS2gCDraMs=", 209 206 "owner": "ghostty-org", 210 207 "repo": "ghostty", 211 - "rev": "65f73f5d20637234058b633855a04c4cbaf14092", 208 + "rev": "9baf37a9b2a1119c697b0eabf32391bfb41ef287", 212 209 "type": "github" 213 210 }, 214 211 "original": { ··· 226 223 ] 227 224 }, 228 225 "locked": { 229 - "lastModified": 1760663237, 230 - "narHash": "sha256-BflA6U4AM1bzuRMR8QqzPXqh8sWVCNDzOdsxXEguJIc=", 226 + "lastModified": 1763988335, 227 + "narHash": "sha256-QlcnByMc8KBjpU37rbq5iP7Cp97HvjRP0ucfdh+M4Qc=", 231 228 "owner": "cachix", 232 229 "repo": "git-hooks.nix", 233 - "rev": "ca5b894d3e3e151ffc1db040b6ce4dcc75d31c37", 230 + "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", 234 231 "type": "github" 235 232 }, 236 233 "original": { ··· 285 282 ] 286 283 }, 287 284 "locked": { 288 - "lastModified": 1760239230, 289 - "narHash": "sha256-eqSP/BAbQwNTlQ/6yuK0yILzZAPNNj91gp6oIfVtu/E=", 285 + "lastModified": 1764361670, 286 + "narHash": "sha256-jgWzgpIaHbL3USIq0gihZeuy1lLf2YSfwvWEwnfAJUw=", 290 287 "owner": "nix-community", 291 288 "repo": "home-manager", 292 - "rev": "c4aaddeaecc09554c92518fd904e3e84b497ed09", 289 + "rev": "780be8ef503a28939cf9dc7996b48ffb1a3e04c6", 293 290 "type": "github" 294 291 }, 295 292 "original": { ··· 344 341 "xwayland-satellite-unstable": "xwayland-satellite-unstable" 345 342 }, 346 343 "locked": { 347 - "lastModified": 1760121522, 348 - "narHash": "sha256-8SGgpcZsMZIqFU+J/1OwebC/px8sgx5YYHNw1XkBM98=", 344 + "lastModified": 1764371600, 345 + "narHash": "sha256-xb9B4pwT/IE/YYXbl67BflRDVK5FRvsFhnq9dkCEoyU=", 349 346 "owner": "sodiboo", 350 347 "repo": "niri-flake", 351 - "rev": "17dbedb88a21142c41d120f139e2870bc56bb5f4", 348 + "rev": "ec3eee4ffda762d6c3df1644ea29eaa40ed45e88", 352 349 "type": "github" 353 350 }, 354 351 "original": { ··· 377 374 "niri-unstable": { 378 375 "flake": false, 379 376 "locked": { 380 - "lastModified": 1759395653, 381 - "narHash": "sha256-sv9J1z6CrTPf9lRJLyCN90fZVdQz7LFeX7pIlInH8BQ=", 377 + "lastModified": 1764306526, 378 + "narHash": "sha256-Lwz8CwV4ryaqbKNZ4ftnNrhwZI29aoHQ5MRJponTDTY=", 382 379 "owner": "YaLTeR", 383 380 "repo": "niri", 384 - "rev": "ba6e5e082a79901dc89b0d49c5da1b769d652aec", 381 + "rev": "0652342df8fffa93abcc5e567be1afb3eab002f6", 385 382 "type": "github" 386 383 }, 387 384 "original": { ··· 408 405 }, 409 406 "nixpkgs-stable": { 410 407 "locked": { 411 - "lastModified": 1759994382, 412 - "narHash": "sha256-wSK+3UkalDZRVHGCRikZ//CyZUJWDJkBDTQX1+G77Ow=", 408 + "lastModified": 1764316264, 409 + "narHash": "sha256-82L+EJU+40+FIdeG4gmUlOF1jeSwlf2AwMarrpdHF6o=", 413 410 "owner": "NixOS", 414 411 "repo": "nixpkgs", 415 - "rev": "5da4a26309e796daa7ffca72df93dbe53b8164c7", 412 + "rev": "9a7b80b6f82a71ea04270d7ba11b48855681c4b0", 416 413 "type": "github" 417 414 }, 418 415 "original": { ··· 453 450 }, 454 451 "nixpkgs_4": { 455 452 "locked": { 456 - "lastModified": 1760038930, 457 - "narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=", 453 + "lastModified": 1764242076, 454 + "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=", 458 455 "owner": "NixOS", 459 456 "repo": "nixpkgs", 460 - "rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3", 457 + "rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4", 461 458 "type": "github" 462 459 }, 463 460 "original": { ··· 469 466 }, 470 467 "nixpkgs_5": { 471 468 "locked": { 472 - "lastModified": 1760038930, 473 - "narHash": "sha256-Oncbh0UmHjSlxO7ErQDM3KM0A5/Znfofj2BSzlHLeVw=", 469 + "lastModified": 1764242076, 470 + "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=", 474 471 "owner": "nixos", 475 472 "repo": "nixpkgs", 476 - "rev": "0b4defa2584313f3b781240b29d61f6f9f7e0df3", 473 + "rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4", 477 474 "type": "github" 478 475 }, 479 476 "original": { ··· 485 482 }, 486 483 "nixpkgs_6": { 487 484 "locked": { 488 - "lastModified": 1759386674, 489 - "narHash": "sha256-wg1Lz/1FC5Q13R+mM5a2oTV9TA9L/CHHTm3/PiLayfA=", 490 - "owner": "nixos", 485 + "lastModified": 1754725699, 486 + "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=", 487 + "owner": "NixOS", 491 488 "repo": "nixpkgs", 492 - "rev": "625ad6366178f03acd79f9e3822606dd7985b657", 489 + "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054", 493 490 "type": "github" 494 491 }, 495 492 "original": { 496 - "owner": "nixos", 497 - "ref": "nixpkgs-unstable", 493 + "owner": "NixOS", 494 + "ref": "nixos-unstable", 498 495 "repo": "nixpkgs", 499 496 "type": "github" 500 497 } 501 498 }, 502 499 "nixpkgs_7": { 503 500 "locked": { 504 - "lastModified": 1759036355, 505 - "narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=", 506 - "owner": "nixos", 501 + "lastModified": 1762111121, 502 + "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=", 503 + "owner": "NixOS", 507 504 "repo": "nixpkgs", 508 - "rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127", 505 + "rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4", 509 506 "type": "github" 510 507 }, 511 508 "original": { 512 - "owner": "nixos", 509 + "owner": "NixOS", 513 510 "ref": "nixos-unstable", 514 511 "repo": "nixpkgs", 515 512 "type": "github" ··· 520 517 "flake-compat": "flake-compat_3", 521 518 "flake-parts": "flake-parts", 522 519 "mnw": "mnw", 523 - "nixpkgs": "nixpkgs_6", 520 + "nixpkgs": [ 521 + "nixpkgs" 522 + ], 524 523 "systems": "systems_3" 525 524 }, 526 525 "locked": { 527 - "lastModified": 1760153667, 528 - "narHash": "sha256-F7KmXT/Izse6Q6CkD5GCImoGPaDJxl03Kd7eD+eY/bU=", 526 + "lastModified": 1762622004, 527 + "narHash": "sha256-NpzzgaoMK8aRHnndHWbYNKLcZN0r1y6icCoJvGoBsoE=", 529 528 "owner": "notashelf", 530 529 "repo": "nvf", 531 - "rev": "9df9d51fd9fc8f9a8fc377f984ea3b7ae796172d", 530 + "rev": "09470524a214ed26633ddc2b6ec0c9bf31a8b909", 532 531 "type": "github" 533 532 }, 534 533 "original": { ··· 537 536 "type": "github" 538 537 } 539 538 }, 539 + "quickshell": { 540 + "inputs": { 541 + "nixpkgs": [ 542 + "nixpkgs" 543 + ] 544 + }, 545 + "locked": { 546 + "lastModified": 1764045583, 547 + "narHash": "sha256-W24ReyRrhOKTKIsuAMkY5hnVlCufGoONM79sjUoyQkk=", 548 + "ref": "refs/heads/master", 549 + "rev": "e9bad67619ee9937a1bbecfc6ad3b4231d2ecdc3", 550 + "revCount": 709, 551 + "type": "git", 552 + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" 553 + }, 554 + "original": { 555 + "type": "git", 556 + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" 557 + } 558 + }, 540 559 "root": { 541 560 "inputs": { 542 561 "dustpan": "dustpan", ··· 547 566 "niri": "niri", 548 567 "nixpkgs": "nixpkgs_5", 549 568 "nvf": "nvf", 569 + "quickshell": "quickshell", 550 570 "solaar": "solaar", 571 + "stash": "stash", 551 572 "vicinae": "vicinae" 552 573 } 553 574 }, ··· 584 605 "snowfall-lib": "snowfall-lib" 585 606 }, 586 607 "locked": { 587 - "lastModified": 1760109596, 588 - "narHash": "sha256-kZ7DKnhg5w2coWHaJWrMjBNlbC94ZmxA5Jpvw9thZhQ=", 608 + "lastModified": 1761840426, 609 + "narHash": "sha256-CprKgnLGKpNB0leamU9hw+ZgocRAsEFevyqIuY0FSiY=", 589 610 "owner": "Svenum", 590 611 "repo": "Solaar-Flake", 591 - "rev": "04a3de5d7b98342e6212d5426250439eee82471b", 612 + "rev": "7b5e221d60195d77fda5c2d69087f7cd1b8d3c20", 592 613 "type": "github" 593 614 }, 594 615 "original": { ··· 598 619 "type": "github" 599 620 } 600 621 }, 622 + "stash": { 623 + "inputs": { 624 + "crane": "crane", 625 + "nixpkgs": "nixpkgs_6" 626 + }, 627 + "locked": { 628 + "lastModified": 1764054504, 629 + "narHash": "sha256-I4nXo/MQXbHg4S00RZZVwaldO/AfhchBFcDlmt4xcaQ=", 630 + "owner": "NotAShelf", 631 + "repo": "stash", 632 + "rev": "f83836531405a42b5d3ad341811736e84275c90f", 633 + "type": "github" 634 + }, 635 + "original": { 636 + "owner": "NotAShelf", 637 + "repo": "stash", 638 + "type": "github" 639 + } 640 + }, 601 641 "systems": { 602 642 "locked": { 603 643 "lastModified": 1681028828, ··· 693 733 }, 694 734 "vicinae": { 695 735 "inputs": { 696 - "flake-utils": "flake-utils_3", 697 - "nixpkgs": "nixpkgs_7" 736 + "nixpkgs": "nixpkgs_7", 737 + "systems": "systems_5" 698 738 }, 699 739 "locked": { 700 - "lastModified": 1760276212, 701 - "narHash": "sha256-7It9jBYdT8lqJLkKN+i/9RplR2Fv3F7bH02gDVlEV0o=", 740 + "lastModified": 1763934927, 741 + "narHash": "sha256-orsv0YJ6e6Sm6/ft56spin/npDf2xXKls1B7HauJ4dk=", 702 742 "owner": "vicinaehq", 703 743 "repo": "vicinae", 704 - "rev": "6c583ff744ce0acf4f1af9c5f5af37057bfcde68", 744 + "rev": "63304cee4a967f30eeca7d875f6c9a8ff4454050", 705 745 "type": "github" 706 746 }, 707 747 "original": { ··· 730 770 "xwayland-satellite-unstable": { 731 771 "flake": false, 732 772 "locked": { 733 - "lastModified": 1759707084, 734 - "narHash": "sha256-0pkftKs6/LReNvxw7DVTN2AJEheZVgyeK0Aarbagi70=", 773 + "lastModified": 1764366786, 774 + "narHash": "sha256-yVCJ4Qe/JkdKDu0DddFdAQgDQVeF12nxH7zv3jtooV4=", 735 775 "owner": "Supreeeme", 736 776 "repo": "xwayland-satellite", 737 - "rev": "a9188e70bd748118b4d56a529871b9de5adb9988", 777 + "rev": "b362a3873710a42f7ac2d8ba03772d8290733934", 738 778 "type": "github" 739 779 }, 740 780 "original": { ··· 759 799 ] 760 800 }, 761 801 "locked": { 762 - "lastModified": 1759192380, 763 - "narHash": "sha256-0BWJgt4OSzxCESij5oo8WLWrPZ+1qLp8KUQe32QeV4Q=", 802 + "lastModified": 1760401936, 803 + "narHash": "sha256-/zj5GYO5PKhBWGzbHbqT+ehY8EghuABdQ2WGfCwZpCQ=", 764 804 "owner": "mitchellh", 765 805 "repo": "zig-overlay", 766 - "rev": "0bcd1401ed43d10f10cbded49624206553e92f57", 806 + "rev": "365085b6652259753b598d43b723858184980bbe", 767 807 "type": "github" 768 808 }, 769 809 "original": {
+11 -29
flake.nix
··· 25 25 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; 26 26 27 27 nvf.url = "github:notashelf/nvf"; 28 + nvf.inputs.nixpkgs.follows = "nixpkgs"; 29 + 30 + quickshell = { 31 + url = "git+https://git.outfoxxed.me/outfoxxed/quickshell"; 32 + inputs.nixpkgs.follows = "nixpkgs"; 33 + }; 28 34 29 35 solaar = { 30 36 url = "github:Svenum/Solaar-Flake/main"; 31 37 inputs.nixpkgs.follows = "nixpkgs"; 32 38 }; 39 + 40 + stash.url = "github:NotAShelf/stash"; 33 41 34 42 vicinae.url = "github:vicinaehq/vicinae"; 35 43 }; 36 44 37 45 outputs = inputs @ { 38 - ghostty, 39 - home-manager, 40 46 nixpkgs, 41 47 self, 42 48 ... 43 49 }: let 44 50 system = "x86_64-linux"; 45 - 46 - mkHost = hostname: modules: 47 - nixpkgs.lib.nixosSystem { 48 - inherit system; 49 - 50 - specialArgs = {inherit inputs hostname;}; 51 - 52 - modules = 53 - modules 54 - ++ [ 55 - home-manager.nixosModules.home-manager 56 - ./home 57 - { 58 - environment.systemPackages = [ 59 - ghostty.packages.${system}.default 60 - ]; 61 - 62 - home-manager = { 63 - useGlobalPkgs = true; 64 - useUserPackages = true; 65 - extraSpecialArgs = {inherit inputs hostname;}; 66 - }; 67 - } 68 - ]; 69 - }; 51 + lib = import ./lib {inherit inputs nixpkgs;}; 70 52 in { 71 53 nixosConfigurations = { 72 - toad = mkHost "toad" [ 54 + toad = lib.mkHost "toad" [ 73 55 ./hosts/toad/configuration.nix 74 56 {nixpkgs.overlays = [inputs.niri.overlays.niri];} 75 57 ]; 76 - thwomp = mkHost "thwomp" [./hosts/thwomp/configuration.nix]; 58 + thwomp = lib.mkHost "thwomp" [./hosts/thwomp/configuration.nix]; 77 59 }; 78 60 79 61 checks.${system} = {
+10 -7
home/configs/bat.nix
··· 1 1 { 2 - osConfig, 2 + config, 3 3 lib, 4 4 ... 5 - }: 6 - lib.optionalAttrs osConfig.users.matthew_hre.configs.bat { 7 - programs.bat = { 8 - enable = true; 9 - config = { 10 - theme = "Dracula"; 5 + }: { 6 + options.home.bat = { 7 + enable = lib.mkEnableOption "bat configuration"; 8 + }; 9 + 10 + config = lib.mkIf config.home.bat.enable { 11 + programs.bat = { 12 + enable = true; 13 + config.theme = "Dracula"; 11 14 }; 12 15 }; 13 16 }
+29 -19
home/configs/btop.nix
··· 1 1 { 2 - osConfig, 2 + config, 3 3 pkgs, 4 4 lib, 5 5 ... 6 - }: 7 - lib.optionalAttrs osConfig.users.matthew_hre.configs.btop { 8 - programs.btop = { 9 - enable = true; 10 - package = pkgs.btop.overrideAttrs (old: rec { 11 - buildInputs = (old.buildInputs or []) ++ [pkgs.rocmPackages.rocm-smi]; 12 - postFixup = lib.concatStringsSep "\n" [ 13 - (old.postFixup or "") 14 - '' 15 - patchelf --add-rpath ${lib.getLib pkgs.rocmPackages.rocm-smi}/lib \ 16 - $out/bin/btop 17 - '' 18 - ]; 19 - }); 6 + }: { 7 + options.home.btop = { 8 + enable = lib.mkEnableOption "btop configuration"; 9 + amdGpuSupport = lib.mkEnableOption "enable AMD GPU support (rocm-smi) in btop"; 10 + }; 20 11 21 - settings = { 22 - color_theme = "Dracula"; 23 - theme_background = false; 24 - selected_gpus = "0"; 12 + config = lib.mkIf config.home.btop.enable { 13 + programs.btop = { 14 + enable = true; 15 + package = 16 + if config.home.btop.amdGpuSupport 17 + then 18 + pkgs.btop.overrideAttrs (old: rec { 19 + buildInputs = (old.buildInputs or []) ++ [pkgs.rocmPackages.rocm-smi]; 20 + postFixup = lib.concatStringsSep "\n" [ 21 + (old.postFixup or "") 22 + '' 23 + patchelf --add-rpath ${lib.getLib pkgs.rocmPackages.rocm-smi}/lib \ 24 + $out/bin/btop 25 + '' 26 + ]; 27 + }) 28 + else pkgs.btop; 29 + 30 + settings = { 31 + color_theme = "Dracula"; 32 + theme_background = false; 33 + selected_gpus = "0"; 34 + }; 25 35 }; 26 36 }; 27 37 }
+18 -13
home/configs/direnv.nix
··· 1 1 { 2 - osConfig, 2 + config, 3 3 lib, 4 4 ... 5 - }: 6 - lib.optionalAttrs osConfig.users.matthew_hre.configs.direnv { 7 - programs.direnv = { 8 - enable = true; 9 - nix-direnv.enable = true; 10 - config = { 11 - global = { 12 - disable_stdin = true; 13 - hide_env_diff = true; 14 - warn_timeout = "0ms"; 5 + }: { 6 + options.home.direnv = { 7 + enable = lib.mkEnableOption "direnv configuration"; 8 + }; 9 + 10 + config = lib.mkIf config.home.direnv.enable { 11 + programs.direnv = { 12 + enable = true; 13 + nix-direnv.enable = true; 14 + config = { 15 + global = { 16 + disable_stdin = true; 17 + hide_env_diff = true; 18 + warn_timeout = "0ms"; 19 + }; 15 20 }; 16 21 }; 22 + 23 + programs.git.ignores = [".direnv/"]; 17 24 }; 18 - 19 - programs.git.ignores = [".direnv/"]; 20 25 }
+80 -75
home/configs/fastfetch.nix
··· 1 1 { 2 - osConfig, 2 + config, 3 3 lib, 4 4 pkgs, 5 5 ... 6 - }: 7 - lib.optionalAttrs osConfig.users.matthew_hre.configs.fastfetch { 8 - programs.fastfetch = { 9 - enable = true; 10 - package = pkgs.fastfetch; 6 + }: { 7 + options.home.fastfetch = { 8 + enable = lib.mkEnableOption "fastfetch configuration"; 9 + }; 11 10 12 - settings = { 13 - "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; 14 - logo = { 15 - source = '' 16 - \\ \\ // 17 - ==\\__\\/ // 18 - // \\// 19 - ==// //== 20 - //\\___// 21 - // /\\ \\== 22 - // \\ \\ 23 - ''; 24 - type = "data"; 25 - color = { 26 - "1" = "blue"; 11 + config = lib.mkIf config.home.fastfetch.enable { 12 + programs.fastfetch = { 13 + enable = true; 14 + package = pkgs.fastfetch; 15 + 16 + settings = { 17 + "$schema" = "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"; 18 + logo = { 19 + source = '' 20 + \\ \\ // 21 + ==\\__\\/ // 22 + // \\// 23 + ==// //== 24 + //\\___// 25 + // /\\ \\== 26 + // \\ \\ 27 + ''; 28 + type = "data"; 29 + color = { 30 + "1" = "blue"; 31 + }; 32 + padding = { 33 + top = 1; 34 + }; 27 35 }; 28 - padding = { 29 - top = 1; 36 + display = { 37 + color = { 38 + keys = "green"; 39 + title = "blue"; 40 + }; 41 + percent = { 42 + type = 9; 43 + }; 44 + separator = " "; 30 45 }; 46 + modules = [ 47 + { 48 + type = "title"; 49 + format = " "; 50 + } 51 + { 52 + type = "title"; 53 + format = "{user-name-colored}{at-symbol-colored}{host-name-colored}"; 54 + } 55 + { 56 + type = "os"; 57 + key = "os "; 58 + format = "{3}"; 59 + keyColor = "green"; 60 + } 61 + { 62 + type = "host"; 63 + key = "host "; 64 + format = "{0}"; 65 + keyColor = "green"; 66 + } 67 + { 68 + type = "kernel"; 69 + key = "kernel "; 70 + keyColor = "green"; 71 + } 72 + { 73 + type = "uptime"; 74 + key = "uptime "; 75 + keyColor = "green"; 76 + } 77 + { 78 + type = "packages"; 79 + key = "pkgs "; 80 + keyColor = "green"; 81 + } 82 + { 83 + type = "memory"; 84 + key = "memory "; 85 + keyColor = "green"; 86 + } 87 + ]; 31 88 }; 32 - display = { 33 - color = { 34 - keys = "green"; 35 - title = "blue"; 36 - }; 37 - percent = { 38 - type = 9; 39 - }; 40 - separator = " "; 41 - }; 42 - modules = [ 43 - { 44 - type = "title"; 45 - format = " "; 46 - } 47 - { 48 - type = "title"; 49 - format = "{user-name-colored}{at-symbol-colored}{host-name-colored}"; 50 - } 51 - { 52 - type = "os"; 53 - key = "os "; 54 - format = "{3}"; 55 - keyColor = "green"; 56 - } 57 - { 58 - type = "host"; 59 - key = "host "; 60 - format = "{0}"; 61 - keyColor = "green"; 62 - } 63 - { 64 - type = "kernel"; 65 - key = "kernel "; 66 - keyColor = "green"; 67 - } 68 - { 69 - type = "uptime"; 70 - key = "uptime "; 71 - keyColor = "green"; 72 - } 73 - { 74 - type = "packages"; 75 - key = "pkgs "; 76 - keyColor = "green"; 77 - } 78 - { 79 - type = "memory"; 80 - key = "memory "; 81 - keyColor = "green"; 82 - } 83 - ]; 84 89 }; 85 90 }; 86 91 }
+32 -26
home/configs/fuzzel.nix
··· 1 1 { 2 - osConfig, 2 + config, 3 3 lib, 4 + pkgs, 4 5 ... 5 - }: 6 - lib.optionalAttrs osConfig.users.matthew_hre.configs.fuzzel { 7 - programs.fuzzel = { 8 - enable = true; 9 - settings = { 10 - main = { 11 - width = 40; 12 - lines = 8; 13 - line-height = 30; 14 - icon-theme = "Papirus"; 15 - prompt = ''" "''; 16 - font = "FiraCode Nerd Font:size=14"; 17 - }; 18 - colors = { 19 - background = "282A36FF"; 20 - text = "f8f8f2ff"; 21 - match = "8be9fdff"; 22 - selection-match = "8be9fdff"; 23 - selection = "BD93F9FF"; 24 - selection-text = "282A36ff"; 25 - border = "44475Aff"; 26 - }; 27 - border = { 28 - width = 2; 29 - radius = 20; 6 + }: { 7 + options.home.fuzzel = { 8 + enable = lib.mkEnableOption "fuzzel configuration"; 9 + }; 10 + 11 + config = lib.mkIf config.home.fuzzel.enable { 12 + programs.fuzzel = { 13 + enable = true; 14 + settings = { 15 + main = { 16 + width = 40; 17 + lines = 8; 18 + line-height = 30; 19 + icon-theme = "Papirus"; 20 + prompt = ''" "''; 21 + font = "FiraCode Nerd Font:size=14"; 22 + }; 23 + colors = { 24 + background = "282A36FF"; 25 + text = "f8f8f2ff"; 26 + match = "8be9fdff"; 27 + selection-match = "8be9fdff"; 28 + selection = "BD93F9FF"; 29 + selection-text = "282A36ff"; 30 + border = "44475Aff"; 31 + }; 32 + border = { 33 + width = 2; 34 + radius = 20; 35 + }; 30 36 }; 31 37 }; 32 38 };
+10 -9
home/configs/garbage.nix
··· 1 1 { 2 - osConfig, 2 + config, 3 3 inputs, 4 4 lib, 5 5 ... 6 - }: 7 - lib.optionalAttrs osConfig.users.matthew_hre.configs.garbage { 6 + }: { 8 7 imports = [ 9 8 inputs.dustpan.homeManagerModules.dustpan 10 9 ]; 11 10 12 - config = { 13 - nix = { 14 - gc = { 15 - automatic = true; 16 - dates = "monthly"; 17 - }; 11 + options.home.garbage = { 12 + enable = lib.mkEnableOption "garbage configuration"; 13 + }; 14 + 15 + config = lib.mkIf config.home.garbage.enable { 16 + nix.gc = { 17 + automatic = true; 18 + dates = "monthly"; 18 19 }; 19 20 20 21 services.dustpan = {
+41 -32
home/configs/git.nix
··· 1 1 { 2 - osConfig, 2 + config, 3 3 lib, 4 4 ... 5 - }: 6 - lib.optionalAttrs osConfig.users.matthew_hre.configs.git { 7 - programs.git = { 8 - enable = true; 9 - userName = "Matthew Hrehirchuk"; 10 - userEmail = "matthew_hre@outlook.com"; 5 + }: { 6 + options.home.git = { 7 + enable = lib.mkEnableOption "git configuration"; 8 + }; 9 + 10 + config = lib.mkIf config.home.git.enable { 11 + programs.git = { 12 + enable = true; 13 + 14 + settings = { 15 + user = { 16 + name = "Matthew Hrehirchuk"; 17 + email = "matthew_hre@outlook.com"; 18 + }; 19 + 20 + include = { 21 + path = "/home/matthew_hre/.config/git/themes.gitconfig"; 22 + }; 11 23 12 - extraConfig = { 13 - include = { 14 - path = "/home/matthew_hre/.config/git/themes.gitconfig"; 15 - }; 16 - core = {pager = "bat";}; 17 - blame = {pager = "bat";}; 18 - delta = { 19 - features = "line-numbers decorations"; 20 - hyperlinks = true; 21 - syntax-theme = "Dracula"; 22 - plus-style = ''syntax "#003800"''; 23 - minus-style = ''syntax "#3f0001"''; 24 - }; 25 - url."git@github.com" = { 26 - insteadOf = "gh"; 27 - }; 28 - url."git@github.com:matthew-hre/" = { 29 - insteadOf = "mh:"; 24 + core = {pager = "bat";}; 25 + blame = {pager = "bat";}; 26 + delta = { 27 + features = "line-numbers decorations"; 28 + hyperlinks = true; 29 + syntax-theme = "Dracula"; 30 + plus-style = ''syntax "#003800"''; 31 + minus-style = ''syntax "#3f0001"''; 32 + }; 33 + url."git@github.com" = { 34 + insteadOf = "gh"; 35 + }; 36 + url."git@github.com:matthew-hre/" = { 37 + insteadOf = "mh:"; 38 + }; 30 39 }; 31 40 }; 32 - }; 33 41 34 - programs.jujutsu = { 35 - enable = true; 36 - settings = { 37 - user = { 38 - name = "Matthew Hrehirchuk"; 39 - email = "matthew_hre@outlook.com"; 42 + programs.jujutsu = { 43 + enable = true; 44 + settings = { 45 + user = { 46 + name = "Matthew Hrehirchuk"; 47 + email = "matthew_hre@outlook.com"; 48 + }; 40 49 }; 41 50 }; 42 51 };
+13 -7
home/configs/ssh.nix
··· 1 1 { 2 - osConfig, 2 + config, 3 3 lib, 4 4 ... 5 - }: 6 - lib.optionalAttrs osConfig.users.matthew_hre.configs.ssh { 7 - programs.ssh = { 8 - enable = true; 9 - extraConfig = " 5 + }: { 6 + options.home.ssh = { 7 + enable = lib.mkEnableOption "ssh configuration"; 8 + }; 9 + 10 + config = 11 + lib.mkIf config.home.ssh.enable { 12 + programs.ssh = { 13 + enable = true; 14 + extraConfig = " 10 15 Host * 11 16 IdentityAgent ~/.1password/agent.sock 12 17 "; 13 - }; 18 + }; 19 + }; 14 20 }
+13 -8
home/configs/vicinae.nix
··· 1 1 { 2 - osConfig, 2 + config, 3 3 inputs, 4 4 lib, 5 5 ... 6 - }: 7 - lib.optionalAttrs osConfig.users.matthew_hre.configs.vicinae { 6 + }: { 8 7 imports = [ 9 8 inputs.vicinae.homeManagerModules.default 10 9 ]; 11 10 12 - services.vicinae = { 13 - enable = true; 14 - settings = { 15 - popToRootOnClose = true; 16 - theme.name = "dracula"; 11 + options.home.vicinae = { 12 + enable = lib.mkEnableOption "vicinae configuration"; 13 + }; 14 + 15 + config = lib.mkIf config.home.vicinae.enable { 16 + services.vicinae = { 17 + enable = true; 18 + settings = { 19 + popToRootOnClose = true; 20 + theme.name = "dracula"; 21 + }; 17 22 }; 18 23 }; 19 24 }
-109
home/default.nix
··· 1 - { 2 - config, 3 - lib, 4 - pkgs, 5 - ... 6 - }: { 7 - options.users.matthew_hre = { 8 - enable = lib.mkEnableOption "enable user config"; 9 - 10 - packages = lib.mkOption { 11 - description = "list of packages to install"; 12 - type = lib.types.listOf lib.types.package; 13 - default = []; 14 - }; 15 - 16 - configs = { 17 - bat = lib.mkEnableOption "enable bat configuration"; 18 - btop = lib.mkEnableOption "enable btop configuration"; 19 - direnv = lib.mkEnableOption "enable direnv configuration"; 20 - fastfetch = lib.mkEnableOption "enable fastfetch configuration"; 21 - fuzzel = lib.mkEnableOption "enable fuzzel configuration"; 22 - garbage = lib.mkEnableOption "enable garbage configuration"; 23 - git = lib.mkEnableOption "enable git configuration"; 24 - ssh = lib.mkEnableOption "enable ssh configuration"; 25 - vicinae = lib.mkEnableOption "enable vicinae configuration"; 26 - helix = lib.mkEnableOption "enable helix configuration"; 27 - nvf = lib.mkEnableOption "enable nvf (neovim) configuration"; 28 - 29 - shell = { 30 - enable = lib.mkEnableOption "enable shell configuration"; 31 - fish = lib.mkEnableOption "enable fish shell configuration"; 32 - ghostty = lib.mkEnableOption "enable ghostty terminal configuration"; 33 - }; 34 - 35 - wayland = { 36 - enable = lib.mkEnableOption "enable wayland configuration"; 37 - dunst = lib.mkEnableOption "enable dunst notification daemon"; 38 - gtk = lib.mkEnableOption "enable gtk configuration"; 39 - hypridle = lib.mkEnableOption "enable hypridle configuration"; 40 - hyprlock = lib.mkEnableOption "enable hyprlock configuration"; 41 - niri = lib.mkEnableOption "enable niri window manager"; 42 - waybar = lib.mkEnableOption "enable waybar configuration"; 43 - wlsunset = lib.mkEnableOption "enable wlsunset (blue light filter)"; 44 - }; 45 - }; 46 - }; 47 - 48 - config = lib.mkIf config.users.matthew_hre.enable { 49 - users.users.matthew_hre = { 50 - isNormalUser = true; 51 - home = "/home/matthew_hre"; 52 - description = "Matthew Hrehirchuk"; 53 - extraGroups = ["wheel" "networkmanager" "docker" "wireshark"]; 54 - shell = pkgs.fish; 55 - }; 56 - 57 - users.defaultUserShell = pkgs.fish; 58 - 59 - home-manager.users.matthew_hre = { 60 - imports = [ 61 - ./configs 62 - ./editors 63 - ./shell 64 - ./wayland 65 - ]; 66 - 67 - home = { 68 - username = "matthew_hre"; 69 - homeDirectory = "/home/matthew_hre"; 70 - stateVersion = "23.11"; 71 - 72 - packages = with pkgs; 73 - [ 74 - zip 75 - xz 76 - unzip 77 - p7zip 78 - ripgrep 79 - eza 80 - fd 81 - television 82 - gh 83 - lazygit 84 - lazydocker 85 - alejandra 86 - nix-output-monitor 87 - glow 88 - strace 89 - ltrace 90 - pciutils 91 - usbutils 92 - xclip 93 - wireshark 94 - ] 95 - ++ config.users.matthew_hre.packages; 96 - 97 - sessionVariables = { 98 - QT_QPA_PLATFORM = "wayland"; 99 - SDL_VIDEODRIVER = "wayland"; 100 - XDG_SESSION_TYPE = "wayland"; 101 - }; 102 - }; 103 - 104 - programs.vscode.enable = true; 105 - 106 - programs.home-manager.enable = true; 107 - }; 108 - }; 109 - }
+1
home/editors/default.nix
··· 2 2 imports = [ 3 3 ./helix 4 4 ./nvf 5 + ./vscode 5 6 ]; 6 7 }
+27 -22
home/editors/helix/default.nix
··· 1 1 { 2 - osConfig, 2 + config, 3 3 lib, 4 4 ... 5 - }: 6 - lib.optionalAttrs osConfig.users.matthew_hre.configs.helix { 7 - programs.helix = { 8 - enable = true; 9 - settings = { 10 - theme = "dracula"; 11 - editor = { 12 - color-modes = true; 13 - cursorline = true; 14 - cursor-shape = { 15 - insert = "bar"; 16 - normal = "block"; 17 - select = "underline"; 18 - }; 19 - undercurl = true; 20 - true-color = true; 21 - lsp = { 22 - display-messages = true; 23 - display-inlay-hints = true; 5 + }: { 6 + options.home.editors.helix = { 7 + enable = lib.mkEnableOption "helix configuration"; 8 + }; 9 + 10 + config = lib.mkIf config.home.editors.helix.enable { 11 + programs.helix = { 12 + enable = true; 13 + settings = { 14 + theme = "dracula"; 15 + editor = { 16 + color-modes = true; 17 + cursorline = true; 18 + cursor-shape = { 19 + insert = "bar"; 20 + normal = "block"; 21 + select = "underline"; 22 + }; 23 + undercurl = true; 24 + true-color = true; 25 + lsp = { 26 + display-messages = true; 27 + display-inlay-hints = true; 28 + }; 29 + auto-pairs = true; 30 + clipboard-provider = "wayland"; 24 31 }; 25 - auto-pairs = true; 26 - clipboard-provider = "wayland"; 27 32 }; 28 33 }; 29 34 };
+8 -5
home/editors/nvf/default.nix
··· 1 1 { 2 - osConfig, 2 + config, 3 3 inputs, 4 4 lib, 5 5 ... 6 - }: 7 - lib.optionalAttrs osConfig.users.matthew_hre.configs.nvf { 6 + }: { 8 7 imports = [ 9 8 inputs.nvf.homeManagerModules.default 10 9 11 10 ./languages.nix 12 11 ]; 13 12 14 - config = { 13 + options.home.editors.nvf = { 14 + enable = lib.mkEnableOption "nvf (neovim) configuration"; 15 + }; 16 + 17 + config = lib.mkIf config.home.editors.nvf.enable { 15 18 programs.nvf = { 16 19 enable = true; 17 20 ··· 26 29 }; 27 30 preventJunkFiles = true; 28 31 29 - clipboard.providers.wl-copy.enable = true; 32 + clipboard.enable = true; 30 33 31 34 keymaps = [ 32 35 {
+16
home/editors/vscode/default.nix
··· 1 + { 2 + config, 3 + inputs, 4 + lib, 5 + ... 6 + }: { 7 + options.home.editors.vscode = { 8 + enable = lib.mkEnableOption "vscode configuration"; 9 + }; 10 + 11 + config = lib.mkIf config.home.editors.vscode.enable { 12 + programs.vscode = { 13 + enable = true; 14 + }; 15 + }; 16 + }
+5 -24
home/shell/default.nix
··· 1 1 { 2 - osConfig, 3 - lib, 4 - ... 5 - }: let 6 - cfg = osConfig.users.matthew_hre.configs.shell; 7 - in 8 - lib.optionalAttrs cfg.enable { 9 - imports = 10 - lib.optional cfg.fish ./fish.nix 11 - ++ lib.optional cfg.ghostty ./ghostty.nix; 12 - 13 - config = { 14 - home.sessionVariables = { 15 - EDITOR = "nvim"; 16 - BROWSER = "firefox"; 17 - TERMINAL = "kitty"; 18 - 19 - DELTA_PAGER = "less -R"; 20 - 21 - MANPAGER = "sh -c 'col -bx | bat -l man -p'"; 22 - MANROFFOPT = "-c"; 23 - }; 24 - }; 25 - } 2 + imports = [ 3 + ./ghostty.nix 4 + ./fish.nix 5 + ]; 6 + }
+56 -42
home/shell/fish.nix
··· 1 - {pkgs, ...}: { 2 - programs.fish = { 3 - enable = true; 4 - interactiveShellInit = '' 5 - set fish_greeting 6 - set --universal pure_enable_nixdevshell true 7 - set --universal pure_symbol_nixdevshell_prefix " " 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.home.shell.fish = { 8 + enable = lib.mkEnableOption "fish shell configuration"; 9 + }; 8 10 9 - function _pure_prompt_nixdevshell \ 10 - --description "Indicate if nix develop shell is activated (icon only)" 11 + config = lib.mkIf config.home.shell.fish.enable { 12 + programs.fish = { 13 + enable = true; 14 + interactiveShellInit = '' 15 + set fish_greeting 16 + set --universal pure_enable_nixdevshell true 17 + set --universal pure_symbol_nixdevshell_prefix " " 11 18 12 - if set --query pure_enable_nixdevshell; 13 - and test "$pure_enable_nixdevshell" = true; 14 - and test -n "$IN_NIX_SHELL" 19 + # https://github.com/NixOS/nixpkgs/issues/462025 20 + set -p fish_complete_path ${pkgs.fish}/share/fish/completions 15 21 16 - set --local prefix (_pure_set_color $pure_color_nixdevshell_prefix)$pure_symbol_nixdevshell_prefix 17 - set --local symbol (_pure_set_color $pure_color_nixdevshell_status) 22 + function _pure_prompt_nixdevshell \ 23 + --description "Indicate if nix develop shell is activated (icon only)" 18 24 19 - echo "$prefix$symbol" 20 - end 21 - end 25 + if set --query pure_enable_nixdevshell; 26 + and test "$pure_enable_nixdevshell" = true; 27 + and test -n "$IN_NIX_SHELL" 22 28 23 - function copyfile 24 - cat $argv | wl-copy 25 - end 29 + set --local prefix (_pure_set_color $pure_color_nixdevshell_prefix)$pure_symbol_nixdevshell_prefix 30 + set --local symbol (_pure_set_color $pure_color_nixdevshell_status) 26 31 27 - zoxide init fish | source 28 - tv init fish | source 29 - ''; 30 - shellAliases = { 31 - ls = "eza -la --octal-permissions --git"; 32 - cat = "bat"; 33 - grep = "grep -n --color"; 34 - mkdir = "mkdir -pv"; 35 - lg = "lazygit"; 36 - ".." = "cd .."; 37 - ":q" = "exit"; 38 - find = "fd"; 32 + echo "$prefix$symbol" 33 + end 34 + end 35 + 36 + function copyfile 37 + cat $argv | wl-copy 38 + end 39 + 40 + zoxide init fish | source 41 + tv init fish | source 42 + ''; 43 + shellAliases = { 44 + ls = "eza -la --octal-permissions --git"; 45 + cat = "bat"; 46 + grep = "grep -n --color"; 47 + mkdir = "mkdir -pv"; 48 + lg = "lazygit"; 49 + ".." = "cd .."; 50 + ":q" = "exit"; 51 + find = "fd"; 52 + }; 53 + plugins = [ 54 + { 55 + name = "pure"; 56 + src = pkgs.fishPlugins.pure.src; 57 + } 58 + ]; 39 59 }; 40 - plugins = [ 41 - { 42 - name = "pure"; 43 - src = pkgs.fishPlugins.pure.src; 44 - } 45 - ]; 46 - }; 47 60 48 - programs.zoxide = { 49 - enable = true; 50 - enableZshIntegration = true; 61 + programs.zoxide = { 62 + enable = true; 63 + enableZshIntegration = true; 64 + }; 51 65 }; 52 66 }
+29 -21
home/shell/ghostty.nix
··· 1 1 { 2 - pkgs, 2 + config, 3 3 inputs, 4 + lib, 5 + pkgs, 4 6 ... 5 7 }: let 6 8 ghostty = inputs.ghostty.packages.${pkgs.system}.default; 7 9 in { 8 - home.sessionVariables = { 9 - GHOSTTY_RESOURCES_DIR = "${ghostty}/share/ghostty"; 10 + options.home.shell.ghostty = { 11 + enable = lib.mkEnableOption "ghostty configuration"; 10 12 }; 11 13 12 - programs.ghostty = { 13 - enable = true; 14 - package = ghostty; 15 - enableFishIntegration = true; 14 + config = lib.mkIf config.home.shell.ghostty.enable { 15 + home.sessionVariables = { 16 + GHOSTTY_RESOURCES_DIR = "${ghostty}/share/ghostty"; 17 + }; 16 18 17 - settings = { 18 - confirm-close-surface = false; 19 - font-family = "FiraCode Nerd Font"; 20 - font-size = 11; 21 - font-style = "Medium"; 22 - gtk-wide-tabs = false; 19 + programs.ghostty = { 20 + enable = true; 21 + package = ghostty; 22 + enableFishIntegration = true; 23 23 24 - window-inherit-working-directory = true; 25 - theme = "Dracula"; 26 - window-decoration = true; 27 - window-theme = "ghostty"; 28 - window-padding-x = 16; 29 - window-padding-y = 16; 30 - window-padding-balance = true; 31 - keybind = ["ctrl+shift+l=new_split:right" "ctrl+shift+d=new_split:down"]; 24 + settings = { 25 + confirm-close-surface = false; 26 + font-family = "FiraCode Nerd Font"; 27 + font-size = 11; 28 + font-style = "Medium"; 29 + gtk-wide-tabs = false; 30 + 31 + window-inherit-working-directory = true; 32 + theme = "Dracula"; 33 + window-decoration = true; 34 + window-theme = "ghostty"; 35 + window-padding-x = 16; 36 + window-padding-y = 16; 37 + window-padding-balance = true; 38 + keybind = ["ctrl+shift+l=new_split:right" "ctrl+shift+d=new_split:down"]; 39 + }; 32 40 }; 33 41 }; 34 42 }
+56 -31
home/wayland/default.nix
··· 1 1 { 2 + config, 2 3 inputs, 3 4 lib, 4 - osConfig, 5 5 pkgs, 6 6 ... 7 7 }: let 8 - cfg = osConfig.users.matthew_hre.configs.wayland; 9 - in 10 - lib.optionalAttrs cfg.enable { 11 - imports = 12 - lib.optional cfg.niri inputs.niri.homeModules.niri 13 - ++ lib.optional cfg.dunst ./dunst 14 - ++ lib.optional cfg.gtk ./gtk 15 - ++ lib.optional cfg.hypridle ./hypridle 16 - ++ lib.optional cfg.hyprlock ./hyprlock 17 - ++ lib.optional cfg.niri ./niri 18 - ++ lib.optional cfg.waybar ./waybar 19 - ++ lib.optional cfg.wlsunset ./wlsunset; 8 + cfg = config.home.wayland; 9 + in { 10 + imports = [ 11 + ./dunst 12 + ./gtk 13 + ./hypridle 14 + ./hyprlock 15 + ./niri 16 + ./quickshell 17 + ./waybar 18 + ./wlsunset 19 + ]; 20 20 21 - config = { 22 - home.packages = with pkgs; [ 23 - amberol 24 - (celluloid.override {youtubeSupport = true;}) 25 - file-roller 26 - loupe 27 - nautilus 28 - pwvucontrol 21 + options.home.wayland.enable = lib.mkOption { 22 + type = lib.types.bool; 23 + default = false; 24 + description = "Enable all wayland components"; 25 + }; 26 + 27 + config = lib.mkMerge [ 28 + (lib.mkIf cfg.enable { 29 + home.wayland.dunst.enable = lib.mkDefault true; 30 + home.wayland.gtk.enable = lib.mkDefault true; 31 + home.wayland.hypridle.enable = lib.mkDefault true; 32 + home.wayland.hyprlock.enable = lib.mkDefault true; 33 + home.wayland.niri.enable = lib.mkDefault true; 34 + home.wayland.waybar.enable = lib.mkDefault true; 35 + home.wayland.wlsunset.enable = lib.mkDefault true; 36 + }) 37 + 38 + (lib.mkIf (lib.any (x: x) [ 39 + cfg.dunst.enable 40 + cfg.gtk.enable 41 + cfg.hypridle.enable 42 + cfg.hyprlock.enable 43 + cfg.niri.enable 44 + cfg.waybar.enable 45 + cfg.wlsunset.enable 46 + ]) { 47 + home.packages = with pkgs; [ 48 + amberol 49 + (celluloid.override {youtubeSupport = true;}) 50 + file-roller 51 + loupe 52 + nautilus 53 + pwvucontrol 29 54 30 - wl-clipboard 31 - cliphist 32 - hyprpicker 55 + cliphist 56 + hyprpicker 33 57 34 - networkmanagerapplet 35 - brightnessctl 58 + networkmanagerapplet 59 + brightnessctl 36 60 37 - xwayland-satellite 61 + xwayland-satellite 38 62 39 - nmgui 40 - ]; 41 - }; 42 - } 63 + nmgui 64 + ]; 65 + }) 66 + ]; 67 + }
+76 -65
home/wayland/dunst/default.nix
··· 1 - {pkgs, ...}: { 2 - services.dunst = { 3 - enable = true; 4 - settings.global = { 5 - monitor = 0; 6 - follow = "mouse"; 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.home.wayland.dunst = { 8 + enable = lib.mkEnableOption "dunst configuration"; 9 + }; 7 10 8 - # geometry 9 - width = 350; 10 - origin = "top-right"; 11 - scale = 0; 12 - offset = "9x9"; 13 - notification_limit = 3; 11 + config = lib.mkIf config.home.wayland.dunst.enable { 12 + services.dunst = { 13 + enable = true; 14 + settings.global = { 15 + monitor = 0; 16 + follow = "mouse"; 14 17 15 - # progress bar 16 - progress_bar = true; 17 - progress_bar_height = 10; 18 - progress_bar_frame_width = 1; 19 - progress_bar_min_width = 150; 20 - progress_bar_max_width = 300; 18 + # geometry 19 + width = 350; 20 + origin = "top-right"; 21 + scale = 0; 22 + offset = "9x9"; 23 + notification_limit = 3; 24 + 25 + # progress bar 26 + progress_bar = true; 27 + progress_bar_height = 10; 28 + progress_bar_frame_width = 1; 29 + progress_bar_min_width = 150; 30 + progress_bar_max_width = 300; 21 31 22 - indicate_hidden = "yes"; 23 - transparency = 0; 24 - separator_height = 1; 25 - padding = 8; 26 - horizontal_padding = 10; 27 - text_icon_padding = 0; 28 - frame_width = 1; 29 - frame_color = "#44475A"; 30 - separator_color = "frame"; 31 - sort = "no"; 32 - idle_threshold = 120; 32 + indicate_hidden = "yes"; 33 + transparency = 0; 34 + separator_height = 1; 35 + padding = 8; 36 + horizontal_padding = 10; 37 + text_icon_padding = 0; 38 + frame_width = 1; 39 + frame_color = "#44475A"; 40 + separator_color = "frame"; 41 + sort = "no"; 42 + idle_threshold = 120; 33 43 34 - # Text 44 + # Text 35 45 36 - font = "Work Sans 10"; 37 - line_height = 0; 38 - markup = "full"; 39 - format = "<small><b>%a :</b>%s</small>\n%b"; 40 - alignment = "left"; 41 - vertical_alignment = "center"; 42 - show_age_threshold = 60; 43 - ellipsize = "middle"; 44 - ignore_newline = "no"; 45 - stack_duplicates = true; 46 - hide_duplicate_count = false; 47 - show_indicators = "yes"; 46 + font = "Work Sans 10"; 47 + line_height = 0; 48 + markup = "full"; 49 + format = "<small><b>%a :</b>%s</small>\n%b"; 50 + alignment = "left"; 51 + vertical_alignment = "center"; 52 + show_age_threshold = 60; 53 + ellipsize = "middle"; 54 + ignore_newline = "no"; 55 + stack_duplicates = true; 56 + hide_duplicate_count = false; 57 + show_indicators = "yes"; 48 58 49 - icon_position = "left"; 50 - min_icon_size = 24; 51 - max_icon_size = 32; 52 - icon_path = "${pkgs.papirus-icon-theme}"; 59 + icon_position = "left"; 60 + min_icon_size = 24; 61 + max_icon_size = 32; 62 + icon_path = "${pkgs.papirus-icon-theme}"; 53 63 54 - sticky_history = "yes"; 55 - history_length = 20; 64 + sticky_history = "yes"; 65 + history_length = 20; 56 66 57 - corner_radius = 11; 58 - }; 67 + corner_radius = 11; 68 + }; 59 69 60 - settings.urgency_low = { 61 - background = "#282a36"; 62 - foreground = "#ffffff"; 63 - timeout = 10; 64 - }; 70 + settings.urgency_low = { 71 + background = "#282a36"; 72 + foreground = "#ffffff"; 73 + timeout = 10; 74 + }; 65 75 66 - settings.urgency_normal = { 67 - background = "#282a36"; 68 - foreground = "#ffffff"; 69 - timeout = 10; 70 - }; 76 + settings.urgency_normal = { 77 + background = "#282a36"; 78 + foreground = "#ffffff"; 79 + timeout = 10; 80 + }; 71 81 72 - settings.urgency_critical = { 73 - background = "#ff5555"; 74 - foreground = "#f8f8f2"; 75 - frame_color = "#ff5555"; 76 - timeout = 0; 82 + settings.urgency_critical = { 83 + background = "#ff5555"; 84 + foreground = "#f8f8f2"; 85 + frame_color = "#ff5555"; 86 + timeout = 0; 87 + }; 77 88 }; 78 89 }; 79 90 }
+17 -6
home/wayland/gtk/default.nix
··· 1 - {pkgs, ...}: { 2 - gtk = { 3 - enable = true; 4 - theme = { 5 - package = pkgs.dracula-theme; 6 - name = "Dracula"; 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.home.wayland.gtk = { 8 + enable = lib.mkEnableOption "GTK configuration"; 9 + }; 10 + 11 + config = lib.mkIf config.home.wayland.gtk.enable { 12 + gtk = { 13 + enable = true; 14 + theme = { 15 + package = pkgs.dracula-theme; 16 + name = "Dracula"; 17 + }; 7 18 }; 8 19 }; 9 20 }
+24 -22
home/wayland/hypridle/default.nix
··· 9 9 # timeout after which DPMS kicks in 10 10 timeout = 300; 11 11 in { 12 - services.hypridle = { 13 - enable = true; 12 + options.home.wayland.hypridle = { 13 + enable = lib.mkEnableOption "hypridle configuration"; 14 + }; 14 15 15 - settings = { 16 - general.lock_cmd = lib.getExe config.programs.hyprlock.package; 16 + config = lib.mkIf config.home.wayland.hypridle.enable { 17 + services.hypridle = { 18 + enable = true; 17 19 18 - listener = [ 19 - { 20 - timeout = timeout - 10; 21 - on-timeout = "brightnessctl -s set 1"; 20 + settings = { 21 + general.lock_cmd = lib.getExe config.programs.hyprlock.package; 22 22 23 - on-resume = "brightnessctl -r"; 24 - } 25 - { 26 - inherit timeout; 27 - } 28 - { 29 - timeout = timeout + 10; 30 - on-timeout = lock; 31 - } 32 - { 33 - timeout = 1800; # 30 mins 34 - on-timeout = "systemctl hibernate"; 35 - } 36 - ]; 23 + listener = [ 24 + { 25 + timeout = timeout - 10; 26 + on-timeout = "brightnessctl -s set 1"; 27 + 28 + on-resume = "brightnessctl -r"; 29 + } 30 + { 31 + inherit timeout; 32 + } 33 + { 34 + timeout = timeout + 10; 35 + on-timeout = lock; 36 + } 37 + ]; 38 + }; 37 39 }; 38 40 }; 39 41 }
+71 -61
home/wayland/hyprlock/default.nix
··· 1 1 { 2 - programs.hyprlock = { 3 - enable = true; 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.home.wayland.hyprlock = { 7 + enable = lib.mkEnableOption "hyprlock configuration"; 8 + }; 4 9 5 - settings = { 6 - general = { 7 - disable_loading_bar = true; 8 - immediate_render = true; 9 - hide_cursor = false; 10 - no_fade_in = true; 11 - }; 10 + config = lib.mkIf config.home.wayland.hyprlock.enable { 11 + programs.hyprlock = { 12 + enable = true; 12 13 13 - auth = { 14 - "fingerprint:enabled" = true; 15 - }; 14 + settings = { 15 + general = { 16 + disable_loading_bar = true; 17 + immediate_render = true; 18 + hide_cursor = false; 19 + no_fade_in = true; 20 + }; 16 21 17 - background = [ 18 - { 19 - monitor = ""; 20 - path = "~/Pictures/outer-wilds-4k.png"; 21 - blur_passes = 2; 22 - blur_size = 7; 23 - noise = 1.17e-2; # what the fuck??? 24 - } 25 - ]; 22 + auth = { 23 + "fingerprint:enabled" = true; 24 + }; 26 25 27 - input-field = [ 28 - { 29 - monitor = "eDP-1"; 26 + background = [ 27 + { 28 + monitor = ""; 29 + path = "~/Pictures/outer-wilds-4k.png"; 30 + blur_passes = 2; 31 + blur_size = 7; 32 + noise = 1.17e-2; # what the fuck??? 33 + } 34 + ]; 30 35 31 - size = "300, 50"; 32 - valign = "bottom"; 33 - position = "0%, 10%"; 36 + input-field = [ 37 + { 38 + monitor = "eDP-1"; 34 39 35 - outline_thickness = 1; 40 + size = "300, 50"; 41 + valign = "bottom"; 42 + position = "0%, 10%"; 36 43 37 - font_color = "rgb(248, 248, 242)"; 44 + outline_thickness = 1; 38 45 39 - outer_color = "rgba(139, 233, 253, 0.5)"; 40 - inner_color = "rgba(80, 250, 123, 0.1)"; 41 - check_color = "rgba(241, 250, 140, 0.5)"; 42 - fail_color = "rgba(255, 85, 85, 0.5)"; 46 + font_color = "rgb(248, 248, 242)"; 43 47 44 - fade_on_empty = false; 45 - placeholder_text = "Enter Password"; 48 + outer_color = "rgba(139, 233, 253, 0.5)"; 49 + inner_color = "rgba(80, 250, 123, 0.1)"; 50 + check_color = "rgba(241, 250, 140, 0.5)"; 51 + fail_color = "rgba(255, 85, 85, 0.5)"; 46 52 47 - dots_spacing = 0.2; 48 - dots_center = true; 49 - dots_fade_time = 100; 53 + fade_on_empty = false; 54 + placeholder_text = "Enter Password"; 50 55 51 - shadow_color = "rgba(0, 0, 0, 0.1)"; 52 - shadow_size = 7; 53 - shadow_passes = 2; 54 - } 55 - ]; 56 + dots_spacing = 0.2; 57 + dots_center = true; 58 + dots_fade_time = 100; 56 59 57 - label = [ 58 - { 59 - monitor = ""; 60 - text = '' 61 - cmd[update:1000] echo "<span>$(date +'%H:%M:%S')</span>" 62 - ''; 63 - font_size = 60; 64 - font_family = "FiraCode Nerd Font"; 60 + shadow_color = "rgba(0, 0, 0, 0.1)"; 61 + shadow_size = 7; 62 + shadow_passes = 2; 63 + } 64 + ]; 65 65 66 - color = "rgb(248, 248, 242)"; 66 + label = [ 67 + { 68 + monitor = ""; 69 + text = '' 70 + cmd[update:1000] echo "<span>$(date +'%H:%M:%S')</span>" 71 + ''; 72 + font_size = 60; 73 + font_family = "FiraCode Nerd Font"; 67 74 68 - position = "0%, -30%"; 75 + color = "rgb(248, 248, 242)"; 69 76 70 - valign = "center"; 71 - halign = "center"; 77 + position = "0%, -30%"; 78 + 79 + valign = "center"; 80 + halign = "center"; 72 81 73 - shadow_color = "rgba(0, 0, 0, 0.1)"; 74 - shadow_size = 20; 75 - shadow_passes = 2; 76 - shadow_boost = 0.3; 77 - } 78 - ]; 82 + shadow_color = "rgba(0, 0, 0, 0.1)"; 83 + shadow_size = 20; 84 + shadow_passes = 2; 85 + shadow_boost = 0.3; 86 + } 87 + ]; 88 + }; 79 89 }; 80 90 }; 81 91 }
+3 -10
home/wayland/niri/binds.nix
··· 6 6 programs.niri.settings.binds = with config.lib.niri.actions; let 7 7 sh = spawn "sh" "-c"; 8 8 powerMenu = pkgs.writeShellScript "power-menu" '' 9 - choice=$(echo -e " Lock\n󰒲 Suspend\n󰋊 Hibernate\n Reboot\n⏻ Shutdown" | fuzzel --dmenu -l 7 -p "󰚥 ") 9 + choice=$(echo -e " Lock\n Reboot\n⏻ Shutdown" | fuzzel --dmenu -l 7 -p "󰚥 ") 10 10 case "$choice" in 11 11 *"Lock") 12 12 hyprlock 13 - ;; 14 - *"Suspend") 15 - systemctl suspend 16 - ;; 17 - *"Hibernate") 18 - systemctl hibernate 19 13 ;; 20 14 *"Reboot") 21 15 systemctl reboot ··· 58 52 "Mod+Shift+Ctrl+Left".action = consume-or-expel-window-left; 59 53 "Mod+Shift+Ctrl+Right".action = consume-or-expel-window-right; 60 54 61 - "Mod+Shift+S".action = screenshot; 62 - "Print".action = screenshot; 63 - "Alt+Print".action = screenshot-window; 55 + "Mod+Shift+S".action.screenshot = []; 56 + "Print".action.screenshot = []; 64 57 65 58 "Mod+Shift+Slash".action = show-hotkey-overlay; 66 59
+97 -85
home/wayland/niri/default.nix
··· 1 - {pkgs, ...}: let 1 + { 2 + config, 3 + inputs, 4 + lib, 5 + pkgs, 6 + ... 7 + }: let 2 8 makeCommand = command: { 3 9 command = [command]; 4 10 }; ··· 8 14 ./rules.nix 9 15 ]; 10 16 11 - programs.niri = { 12 - enable = true; 13 - package = pkgs.niri; 17 + options.home.wayland.niri = { 18 + enable = lib.mkEnableOption "niri configuration"; 19 + }; 14 20 15 - settings = { 16 - environment = { 17 - CLUTTER_BACKEND = "wayland"; 18 - GDK_BACKEND = "wayland,x11"; 19 - MOZ_ENABLE_WAYLAND = "1"; 20 - QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; 21 - SDL_VIDEODRIVER = "wayland"; 22 - }; 21 + config = lib.mkIf config.home.wayland.niri.enable { 22 + programs.niri = { 23 + enable = true; 24 + package = pkgs.niri; 23 25 24 - spawn-at-startup = [ 25 - (makeCommand "swww-daemon") 26 - (makeCommand "NetworkManager") 27 - (makeCommand "waybar") 28 - {command = ["wl-paste" "--watch" "cliphist" "store"];} 29 - ]; 26 + settings = { 27 + environment = { 28 + CLUTTER_BACKEND = "wayland"; 29 + GDK_BACKEND = "wayland,x11"; 30 + MOZ_ENABLE_WAYLAND = "1"; 31 + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; 32 + SDL_VIDEODRIVER = "wayland"; 33 + }; 30 34 31 - cursor = { 32 - theme = "BreezeX-Dark"; 33 - size = 24; 34 - }; 35 + spawn-at-startup = [ 36 + (makeCommand "swww-daemon") 37 + (makeCommand "NetworkManager") 38 + (makeCommand "qs") 39 + {command = ["stash" "watch"];} 40 + ]; 35 41 36 - hotkey-overlay = { 37 - skip-at-startup = true; 38 - }; 42 + cursor = { 43 + theme = "BreezeX-Dark"; 44 + size = 24; 45 + }; 39 46 40 - overview = { 41 - workspace-shadow.enable = false; 42 - backdrop-color = "transparent"; 43 - }; 47 + hotkey-overlay = { 48 + skip-at-startup = true; 49 + }; 44 50 45 - gestures.hot-corners.enable = false; 51 + overview = { 52 + workspace-shadow.enable = false; 53 + backdrop-color = "transparent"; 54 + }; 46 55 47 - switch-events = { 48 - lid-close.action.spawn = ["hyprlock"]; 49 - }; 56 + gestures.hot-corners.enable = false; 50 57 51 - prefer-no-csd = true; 58 + switch-events = { 59 + lid-close.action.spawn = ["hyprlock"]; 60 + }; 52 61 53 - layout = { 54 - gaps = 8; 55 - center-focused-column = "never"; 62 + prefer-no-csd = true; 56 63 57 - default-column-width.proportion = 1.0; 64 + layout = { 65 + gaps = 8; 66 + center-focused-column = "never"; 58 67 59 - background-color = "transparent"; 68 + default-column-width.proportion = 1.0; 60 69 61 - insert-hint.display = { 62 - color = "#BD93F9AA"; 63 - }; 70 + background-color = "transparent"; 64 71 65 - focus-ring = { 66 - enable = false; 67 - width = 1; 68 - active.color = "#44475A"; 69 - inactive.color = "#282A36"; 70 - }; 72 + insert-hint.display = { 73 + color = "#BD93F9AA"; 74 + }; 75 + 76 + focus-ring = { 77 + enable = false; 78 + width = 1; 79 + active.color = "#44475A"; 80 + inactive.color = "#282A36"; 81 + }; 71 82 72 - border = { 73 - enable = true; 74 - width = 1; 75 - active.color = "#44475A"; 76 - inactive.color = "#282A36"; 83 + border = { 84 + enable = true; 85 + width = 1; 86 + active.color = "#44475A"; 87 + inactive.color = "#282A36"; 88 + }; 77 89 }; 78 - }; 79 90 80 - animations.window-resize.custom-shader = '' 81 - vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) { 82 - vec3 coords_next_geo = niri_curr_geo_to_next_geo * coords_curr_geo; 91 + animations.window-resize.custom-shader = '' 92 + vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) { 93 + vec3 coords_next_geo = niri_curr_geo_to_next_geo * coords_curr_geo; 83 94 84 - vec3 coords_stretch = niri_geo_to_tex_next * coords_curr_geo; 85 - vec3 coords_crop = niri_geo_to_tex_next * coords_next_geo; 95 + vec3 coords_stretch = niri_geo_to_tex_next * coords_curr_geo; 96 + vec3 coords_crop = niri_geo_to_tex_next * coords_next_geo; 86 97 87 - // We can crop if the current window size is smaller than the next window 88 - // size. One way to tell is by comparing to 1.0 the X and Y scaling 89 - // coefficients in the current-to-next transformation matrix. 90 - bool can_crop_by_x = niri_curr_geo_to_next_geo[0][0] <= 1.0; 91 - bool can_crop_by_y = niri_curr_geo_to_next_geo[1][1] <= 1.0; 98 + // We can crop if the current window size is smaller than the next window 99 + // size. One way to tell is by comparing to 1.0 the X and Y scaling 100 + // coefficients in the current-to-next transformation matrix. 101 + bool can_crop_by_x = niri_curr_geo_to_next_geo[0][0] <= 1.0; 102 + bool can_crop_by_y = niri_curr_geo_to_next_geo[1][1] <= 1.0; 92 103 93 - vec3 coords = coords_stretch; 94 - if (can_crop_by_x) 95 - coords.x = coords_crop.x; 96 - if (can_crop_by_y) 97 - coords.y = coords_crop.y; 104 + vec3 coords = coords_stretch; 105 + if (can_crop_by_x) 106 + coords.x = coords_crop.x; 107 + if (can_crop_by_y) 108 + coords.y = coords_crop.y; 98 109 99 - vec4 color = texture2D(niri_tex_next, coords.st); 110 + vec4 color = texture2D(niri_tex_next, coords.st); 100 111 101 - // However, when we crop, we also want to crop out anything outside the 102 - // current geometry. This is because the area of the shader is unspecified 103 - // and usually bigger than the current geometry, so if we don't fill pixels 104 - // outside with transparency, the texture will leak out. 105 - // 106 - // When stretching, this is not an issue because the area outside will 107 - // correspond to client-side decoration shadows, which are already supposed 108 - // to be outside. 109 - if (can_crop_by_x && (coords_curr_geo.x < 0.0 || 1.0 < coords_curr_geo.x)) 110 - color = vec4(0.0); 111 - if (can_crop_by_y && (coords_curr_geo.y < 0.0 || 1.0 < coords_curr_geo.y)) 112 - color = vec4(0.0); 112 + // However, when we crop, we also want to crop out anything outside the 113 + // current geometry. This is because the area of the shader is unspecified 114 + // and usually bigger than the current geometry, so if we don't fill pixels 115 + // outside with transparency, the texture will leak out. 116 + // 117 + // When stretching, this is not an issue because the area outside will 118 + // correspond to client-side decoration shadows, which are already supposed 119 + // to be outside. 120 + if (can_crop_by_x && (coords_curr_geo.x < 0.0 || 1.0 < coords_curr_geo.x)) 121 + color = vec4(0.0); 122 + if (can_crop_by_y && (coords_curr_geo.y < 0.0 || 1.0 < coords_curr_geo.y)) 123 + color = vec4(0.0); 113 124 114 - return color; 115 - } 116 - ''; 125 + return color; 126 + } 127 + ''; 128 + }; 117 129 }; 118 130 }; 119 131 }
+31
home/wayland/quickshell/default.nix
··· 1 + { 2 + config, 3 + inputs, 4 + lib, 5 + pkgs, 6 + ... 7 + }: { 8 + options.home.wayland.quickshell = { 9 + enable = lib.mkEnableOption "quickshell configuration"; 10 + }; 11 + 12 + config = lib.mkIf config.home.wayland.quickshell.enable { 13 + home.packages = [ 14 + inputs.quickshell.packages.${pkgs.system}.default 15 + pkgs.qt6Packages.qt5compat 16 + pkgs.libsForQt5.qt5.qtgraphicaleffects 17 + pkgs.kdePackages.qtbase 18 + pkgs.kdePackages.qtdeclarative 19 + pkgs.kdePackages.qtstyleplugin-kvantum 20 + pkgs.wallust 21 + pkgs.material-symbols 22 + pkgs.material-icons 23 + pkgs.cava 24 + pkgs.gpu-screen-recorder 25 + ]; 26 + 27 + home.sessionVariables = { 28 + QML_IMPORT_PATH = "${pkgs.qt6.qt5compat}/lib/qt-6/qml:${pkgs.qt6.qtdeclarative}/lib/qt-6/qml"; 29 + }; 30 + }; 31 + }
+84 -74
home/wayland/waybar/default.nix
··· 1 - let 1 + { 2 + config, 3 + lib, 4 + ... 5 + }: let 2 6 icons = rec { 3 7 calendar = "󰃭 "; 4 8 clock = " "; ··· 26 30 notification.bell-outline-badge = "󰅸"; 27 31 }; 28 32 in { 29 - programs.waybar = { 30 - enable = true; 31 - settings.mainBar = { 32 - layer = "top"; 33 - modules-left = ["custom/clock"]; 34 - modules-center = ["niri/window"]; 35 - modules-right = ["wireplumber" "network" "bluetooth" "battery"]; 33 + options.home.wayland.waybar = { 34 + enable = lib.mkEnableOption "waybar configuration"; 35 + }; 36 36 37 - battery = { 38 - interval = 5; 39 - format = "{icon} {capacity}%"; 40 - format-charging = "${icons.battery.charging} {capacity}%"; 41 - format-icons = icons.battery.levels; 42 - states.warning = 20; 43 - states.critical = 10; 44 - }; 37 + config = lib.mkIf config.home.wayland.waybar.enable { 38 + programs.waybar = { 39 + enable = true; 40 + settings.mainBar = { 41 + layer = "top"; 42 + modules-left = ["custom/clock"]; 43 + modules-center = ["niri/window"]; 44 + modules-right = ["wireplumber" "network" "bluetooth" "battery"]; 45 45 46 - "custom/clock" = { 47 - exec = "date +\"%-I:%M:%S %p\""; 48 - interval = 1; 49 - tooltip = false; 50 - }; 46 + battery = { 47 + interval = 5; 48 + format = "{icon} {capacity}%"; 49 + format-charging = "${icons.battery.charging} {capacity}%"; 50 + format-icons = icons.battery.levels; 51 + states.warning = 20; 52 + states.critical = 10; 53 + }; 51 54 52 - network = { 53 - tooltip-format = "{ifname}"; 54 - format-disconnected = icons.network.disconnected; 55 - format-ethernet = icons.network.ethernet; 56 - format-wifi = "{icon} {essid}"; 57 - format-icons = icons.network.strength; 58 - on-click = "nmgui"; 59 - }; 55 + "custom/clock" = { 56 + exec = "date +\"%-I:%M:%S %p\""; 57 + interval = 1; 58 + tooltip = false; 59 + }; 60 60 61 - bluetooth = { 62 - format = "{icon}"; 63 - format-disabled = ""; 64 - format-icons = { 65 - inherit (icons.bluetooth) on off; 66 - connected = icons.bluetooth.on; 61 + network = { 62 + tooltip-format = "{ifname}"; 63 + format-disconnected = icons.network.disconnected; 64 + format-ethernet = icons.network.ethernet; 65 + format-wifi = "{icon} {essid}"; 66 + format-icons = icons.network.strength; 67 + on-click = "nmgui"; 67 68 }; 68 - format-connected = "{icon} {device_alias}"; 69 - }; 70 69 71 - wireplumber = { 72 - format = "{icon} {volume}%"; 73 - format-muted = "${icons.volume.muted} {volume}%"; 74 - format-icons = icons.volume.levels; 75 - reverse-scrolling = 1; 76 - tooltip = false; 70 + bluetooth = { 71 + format = "{icon}"; 72 + format-disabled = ""; 73 + format-icons = { 74 + inherit (icons.bluetooth) on off; 75 + connected = icons.bluetooth.on; 76 + }; 77 + format-connected = "{icon} {device_alias}"; 78 + }; 79 + 80 + wireplumber = { 81 + format = "{icon} {volume}%"; 82 + format-muted = "${icons.volume.muted} {volume}%"; 83 + format-icons = icons.volume.levels; 84 + reverse-scrolling = 1; 85 + tooltip = false; 86 + }; 77 87 }; 78 - }; 79 - style = let 80 - modules = s: "${s ".modules-left"}, ${s ".modules-center"}, ${s ".modules-right"}"; 81 - module = s: modules (m: "${m} > ${s} > *"); 82 - in '' 83 - * { 84 - border: none; 85 - font-family: "Work Sans"; 86 - font-size: 14px; 87 - } 88 + style = let 89 + modules = s: "${s ".modules-left"}, ${s ".modules-center"}, ${s ".modules-right"}"; 90 + module = s: modules (m: "${m} > ${s} > *"); 91 + in '' 92 + * { 93 + border: none; 94 + font-family: "Work Sans"; 95 + font-size: 14px; 96 + } 88 97 89 - window#waybar { 90 - background: transparent; /* #282A36; */ 91 - } 98 + window#waybar { 99 + background: transparent; /* #282A36; */ 100 + } 92 101 93 - #workspaces button { 94 - padding: 0; 95 - margin: 0; 96 - } 102 + #workspaces button { 103 + padding: 0; 104 + margin: 0; 105 + } 97 106 98 - ${module ":first-child"} { 99 - padding-left: 10px; 100 - } 107 + ${module ":first-child"} { 108 + padding-left: 10px; 109 + } 101 110 102 - ${module ":last-child"} { 103 - padding-right: 10px; 104 - } 111 + ${module ":last-child"} { 112 + padding-right: 10px; 113 + } 105 114 106 - ${module "*"} { 107 - margin: 3px 1px; 108 - padding: 2px 6px; 109 - } 115 + ${module "*"} { 116 + margin: 3px 1px; 117 + padding: 2px 6px; 118 + } 110 119 111 - #tooltip { 112 - background-color: #282A36; 113 - } 114 - ''; 120 + #tooltip { 121 + background-color: #282A36; 122 + } 123 + ''; 124 + }; 115 125 }; 116 126 }
+14 -4
home/wayland/wlsunset/default.nix
··· 1 1 { 2 - services.wlsunset = { 3 - enable = true; 4 - latitude = 51; 5 - longitude = -114; 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.home.wayland.wlsunset = { 7 + enable = lib.mkEnableOption "wlsunset configuration"; 8 + }; 9 + 10 + config = lib.mkIf config.home.wayland.wlsunset.enable { 11 + services.wlsunset = { 12 + enable = true; 13 + latitude = 51; 14 + longitude = -114; 15 + }; 6 16 }; 7 17 }
+18 -44
hosts/thwomp/configuration.nix
··· 6 6 pkgs, 7 7 inputs, 8 8 ... 9 - }: let 10 - system = ../../system; 11 - in { 9 + }: { 12 10 imports = [ 13 11 ./hardware-configuration.nix 14 - "${system}/core" 15 - "${system}/shared" 16 - "${system}/hardware/amd.nix" 17 - "${system}/hardware/bluetooth.nix" 18 - "${system}/network" 19 - "${system}/programs/discord.nix" 20 - "${system}/programs/fonts.nix" 21 - "${system}/programs/libre.nix" 22 - "${system}/programs/plasma.nix" 23 - "${system}/programs/steam.nix" 24 - "${system}/services/boot.nix" 25 - "${system}/services/docker.nix" 26 - "${system}/services/greetd.nix" 27 - "${system}/services/openssh.nix" 28 - "${system}/services/openvpn.nix" 29 - "${system}/services/pipewire.nix" 12 + ../../system 30 13 31 14 inputs.solaar.nixosModules.default 32 15 ]; 33 16 34 - users.matthew_hre = { 35 - enable = true; 36 - configs = { 37 - bat = true; 38 - btop = true; 39 - direnv = true; 40 - fastfetch = true; 41 - fuzzel = true; 42 - garbage = true; 43 - git = true; 44 - ssh = true; 45 - vicinae = false; 46 - helix = true; 47 - nvf = true; 17 + modules = { 18 + hardware.amd.enable = true; 19 + hardware.bluetooth.enable = true; 48 20 49 - shell = { 50 - enable = true; 51 - fish = true; 52 - ghostty = true; 53 - }; 21 + programs.discord.enable = true; 22 + programs.fonts.enable = true; 23 + programs.libre.enable = true; 24 + programs.plasma.enable = true; 25 + programs.steam.enable = true; 54 26 55 - wayland = { 56 - enable = false; 57 - }; 58 - }; 27 + services.boot.enable = true; 28 + services.docker.enable = true; 29 + services.greetd.enable = true; 30 + services.network.enable = true; 31 + services.openssh.enable = true; 32 + services.openvpn.enable = true; 33 + services.pipewire.enable = true; 34 + services.security.enable = true; 59 35 }; 60 36 61 37 networking.hostName = "thwomp"; ··· 74 50 ExecStart = ''/bin/sh -c 'echo XHC2 > /proc/acpi/wakeup' ''; 75 51 }; 76 52 }; 77 - 78 - systemd.services.NetworkManager-wait-online.enable = false; 79 53 80 54 hardware.enableAllFirmware = true; 81 55 boot.kernelPackages = pkgs.linuxPackages_latest;
+23 -59
hosts/toad/configuration.nix
··· 1 - {pkgs, ...}: let 2 - system = ../../system; 3 - in { 1 + {pkgs, ...}: { 4 2 imports = [ 5 3 ./hardware-configuration.nix 6 - "${system}/core" 7 - "${system}/shared" 8 - "${system}/hardware/bluetooth.nix" 9 - "${system}/hardware/fprintd.nix" 10 - "${system}/hardware/fwupd.nix" 11 - "${system}/network" 12 - "${system}/programs/discord.nix" 13 - "${system}/programs/fonts.nix" 14 - "${system}/programs/libre.nix" 15 - "${system}/programs/niri.nix" 16 - "${system}/programs/steam.nix" 17 - "${system}/programs/xdg.nix" 18 - "${system}/services/boot.nix" 19 - "${system}/services/docker.nix" 20 - "${system}/services/greetd.nix" 21 - "${system}/services/openssh.nix" 22 - "${system}/services/openvpn.nix" 23 - "${system}/services/pipewire.nix" 24 - "${system}/services/power.nix" 4 + ../../system 25 5 ]; 26 6 27 - users.matthew_hre = { 28 - enable = true; 29 - configs = { 30 - bat = true; 31 - btop = true; 32 - direnv = true; 33 - fastfetch = true; 34 - fuzzel = true; 35 - garbage = true; 36 - git = true; 37 - ssh = true; 38 - vicinae = true; 39 - helix = true; 40 - nvf = true; 41 - 42 - shell = { 43 - enable = true; 44 - fish = true; 45 - ghostty = true; 46 - }; 7 + modules = { 8 + hardware.amd.enable = true; 9 + hardware.bluetooth.enable = true; 10 + hardware.fprintd.enable = true; 11 + hardware.fwupd.enable = true; 47 12 48 - wayland = { 49 - enable = true; 50 - dunst = true; 51 - gtk = true; 52 - hypridle = true; 53 - hyprlock = true; 54 - niri = true; 55 - waybar = true; 56 - wlsunset = true; 57 - }; 58 - }; 59 - }; 13 + programs.discord.enable = true; 14 + programs.fonts.enable = true; 15 + programs.libre.enable = true; 16 + programs.niri.enable = true; 17 + programs.steam.enable = true; 18 + programs.xdg.enable = true; 60 19 61 - services.hibernation = { 62 - enable = true; 63 - swapDeviceUUID = "773e93e2-0dd1-48f1-95a8-7f8acb4fb177"; 64 - lidAction = "suspend-then-hibernate"; 65 - hibernateDelay = "30m"; 20 + services.boot.enable = true; 21 + services.docker.enable = true; 22 + services.greetd.enable = true; 23 + services.network.enable = true; 24 + services.openssh.enable = true; 25 + services.openvpn.enable = true; 26 + services.pipewire.enable = true; 27 + services.power.enable = true; 28 + services.security.enable = true; 29 + services.security.fingerprintPam.enable = true; 66 30 }; 67 31 68 32 networking.hostName = "toad";
+31
lib/default.nix
··· 1 + { 2 + inputs, 3 + nixpkgs, 4 + }: let 5 + system = "x86_64-linux"; 6 + in { 7 + mkHost = hostname: modules: 8 + nixpkgs.lib.nixosSystem { 9 + inherit system; 10 + 11 + specialArgs = {inherit inputs hostname;}; 12 + 13 + modules = 14 + modules 15 + ++ [ 16 + inputs.home-manager.nixosModules.home-manager 17 + ../users/matthew_hre/${hostname}.nix 18 + { 19 + environment.systemPackages = [ 20 + inputs.ghostty.packages.${system}.default 21 + ]; 22 + 23 + home-manager = { 24 + useGlobalPkgs = true; 25 + useUserPackages = true; 26 + extraSpecialArgs = {inherit inputs hostname;}; 27 + }; 28 + } 29 + ]; 30 + }; 31 + }
+53
system/base.nix
··· 1 + { 2 + lib, 3 + pkgs, 4 + ... 5 + }: { 6 + environment.systemPackages = with pkgs; [ 7 + git 8 + libnotify 9 + nomacs 10 + obsidian 11 + vim 12 + 13 + (pkgs.writeShellScriptBin "rebuild" '' 14 + sudo nixos-rebuild switch --flake ~/nix-config#$HOSTNAME 2>&1 | nom 15 + '') 16 + (pkgs.writeShellScriptBin "rebuild-test" '' 17 + sudo nixos-rebuild test --flake ~/nix-config#$HOSTNAME 2>&1 | nom 18 + '') 19 + ]; 20 + 21 + environment.sessionVariables = { 22 + NIXOS_OZONE_WL = "1"; 23 + 24 + # ELECTRON_OZONE_PLATFORM_HINT can be overridden per host 25 + # mainly due to some kde issues 26 + ELECTRON_OZONE_PLATFORM_HINT = lib.mkDefault "wayland"; 27 + }; 28 + 29 + i18n.defaultLocale = "en_CA.UTF-8"; 30 + time.timeZone = "America/Edmonton"; 31 + 32 + services.journald.extraConfig = "SystemMaxUse=1G"; 33 + 34 + nix.settings.experimental-features = ["nix-command" "flakes"]; 35 + nixpkgs.config.allowUnfree = true; 36 + 37 + programs.firefox.enable = true; 38 + programs.fish.enable = true; 39 + programs._1password-gui = { 40 + enable = true; 41 + polkitPolicyOwners = ["matthew_hre"]; 42 + }; 43 + programs.wireshark.enable = true; 44 + 45 + services.printing.enable = true; 46 + 47 + hardware.graphics = { 48 + enable = true; 49 + enable32Bit = true; 50 + }; 51 + 52 + services.xserver.xkb.layout = "us"; 53 + }
-12
system/core/default.nix
··· 1 - { 2 - imports = [ 3 - ../nix 4 - ./security.nix 5 - ../services/hibernation.nix 6 - ]; 7 - time.timeZone = "America/Edmonton"; 8 - 9 - services.journald.extraConfig = "SystemMaxUse=1G"; 10 - 11 - i18n.defaultLocale = "en_CA.UTF-8"; 12 - }
-26
system/core/security.nix
··· 1 - { 2 - hostname, 3 - lib, 4 - ... 5 - }: let 6 - toad = hostname == "toad"; 7 - in { 8 - security = { 9 - sudo.enable = true; 10 - rtkit.enable = true; 11 - 12 - pam.services = { 13 - hyprlock = { 14 - text = lib.mkIf toad "auth include login"; 15 - enableGnomeKeyring = true; 16 - }; 17 - 18 - "polkit-1" = lib.mkIf toad { 19 - fprintAuth = true; 20 - }; 21 - 22 - greetd.enableGnomeKeyring = true; 23 - login.enableGnomeKeyring = true; 24 - }; 25 - }; 26 - }
+25
system/default.nix
··· 1 + { 2 + imports = [ 3 + ./base.nix 4 + ./hardware/amd.nix 5 + ./hardware/bluetooth.nix 6 + ./hardware/fprintd.nix 7 + ./hardware/fwupd.nix 8 + ./programs/discord.nix 9 + ./programs/fonts.nix 10 + ./programs/libre.nix 11 + ./programs/niri.nix 12 + ./programs/plasma.nix 13 + ./programs/steam.nix 14 + ./programs/xdg.nix 15 + ./services/boot.nix 16 + ./services/docker.nix 17 + ./services/greetd.nix 18 + ./services/network.nix 19 + ./services/openssh.nix 20 + ./services/openvpn.nix 21 + ./services/pipewire.nix 22 + ./services/power.nix 23 + ./services/security.nix 24 + ]; 25 + }
+9 -1
system/hardware/amd.nix
··· 1 1 { 2 - boot.initrd.kernelModules = ["amdgpu"]; 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.hardware.amd.enable = lib.mkEnableOption "AMD support"; 7 + 8 + config = lib.mkIf config.modules.hardware.amd.enable { 9 + boot.initrd.kernelModules = ["amdgpu"]; 10 + }; 3 11 }
+11 -5
system/hardware/bluetooth.nix
··· 1 1 { 2 - hardware.bluetooth = { 3 - enable = true; 4 - powerOnBoot = true; 5 - settings = { 6 - Policy.AutoEnable = true; 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.hardware.bluetooth.enable = lib.mkEnableOption "bluetooth support"; 7 + 8 + config = lib.mkIf config.modules.hardware.bluetooth.enable { 9 + hardware.bluetooth = { 10 + enable = true; 11 + powerOnBoot = true; 12 + settings.Policy.AutoEnable = true; 7 13 }; 8 14 }; 9 15 }
+16 -7
system/hardware/fprintd.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - fprintd 4 - ]; 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.modules.hardware.fprintd.enable = lib.mkEnableOption "fprintd support"; 8 + 9 + config = lib.mkIf config.modules.hardware.fprintd.enable { 10 + environment.systemPackages = with pkgs; [ 11 + fprintd 12 + ]; 5 13 6 - services.fprintd.enable = true; 7 - services.fprintd.tod.driver = pkgs.libfprint-2-tod1-vfs0090; 14 + services.fprintd.enable = true; 15 + services.fprintd.tod.driver = pkgs.libfprint-2-tod1-vfs0090; 8 16 9 - security.pam.services."1password".fprintAuth = true; 17 + security.pam.services."1password".fprintAuth = true; 18 + }; 10 19 }
+9 -1
system/hardware/fwupd.nix
··· 1 1 { 2 - services.fwupd.enable = true; 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.hardware.fwupd.enable = lib.mkEnableOption "fwupd support"; 7 + 8 + config = lib.mkIf config.modules.hardware.fwupd.enable { 9 + services.fwupd.enable = true; 10 + }; 3 11 }
-10
system/network/default.nix
··· 1 - { 2 - networking = { 3 - networkmanager = { 4 - enable = true; 5 - wifi.powersave = false; 6 - wifi.scanRandMacAddress = false; 7 - }; 8 - firewall.enable = true; 9 - }; 10 - }
-6
system/nix/default.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = [pkgs.git]; # needed for flakes 3 - 4 - nix.settings.experimental-features = ["nix-command" "flakes"]; 5 - nixpkgs.config.allowUnfree = true; 6 - }
+15 -7
system/programs/discord.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - (discord.override { 4 - withOpenASAR = true; 5 - withVencord = true; 6 - }) 7 - ]; 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.modules.programs.discord.enable = lib.mkEnableOption "discord support"; 8 + 9 + config = lib.mkIf config.modules.programs.discord.enable { 10 + environment.systemPackages = with pkgs; [ 11 + (discord.override { 12 + withOpenASAR = true; 13 + }) 14 + ]; 15 + }; 8 16 }
+17 -8
system/programs/fonts.nix
··· 1 - {pkgs, ...}: { 2 - fonts.packages = with pkgs; [ 3 - departure-mono 4 - fira-code 5 - fira-code-symbols 6 - work-sans 7 - nerd-fonts.fira-code 8 - ]; 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.modules.programs.fonts.enable = lib.mkEnableOption "fonts support"; 8 + 9 + config = lib.mkIf config.modules.programs.fonts.enable { 10 + fonts.packages = with pkgs; [ 11 + departure-mono 12 + fira-code 13 + fira-code-symbols 14 + work-sans 15 + nerd-fonts.fira-code 16 + ]; 17 + }; 9 18 }
+16 -7
system/programs/libre.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - hunspell 4 - hunspellDicts.en_CA 5 - hunspellDicts.en_US 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.modules.programs.libre.enable = lib.mkEnableOption "libreoffice support"; 8 + 9 + config = lib.mkIf config.modules.programs.libre.enable { 10 + environment.systemPackages = with pkgs; [ 11 + hunspell 12 + hunspellDicts.en_CA 13 + hunspellDicts.en_US 6 14 7 - libreoffice-qt 8 - ]; 15 + libreoffice-qt 16 + ]; 17 + }; 9 18 }
+54 -38
system/programs/niri.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - swww # needs to be installed at the system level 4 - polkit_gnome 5 - ]; 1 + { 2 + config, 3 + inputs, 4 + lib, 5 + pkgs, 6 + ... 7 + }: { 8 + options.modules.programs.niri.enable = lib.mkEnableOption "niri support"; 6 9 7 - programs.niri = { 8 - enable = true; 9 - package = pkgs.niri; 10 - }; 10 + config = let 11 + stashPkg = inputs.stash.packages.x86_64-linux.stash; 12 + in 13 + lib.mkIf config.modules.programs.niri.enable { 14 + environment.systemPackages = with pkgs; [ 15 + swww # needs to be installed at the system level 16 + polkit_gnome 17 + stashPkg 18 + ]; 11 19 12 - # shoutout @CodedNil on gh for the fix 13 - # waiting on https://github.com/YaLTeR/niri/pull/1923 for a real fix 14 - services.keyd = { 15 - enable = true; 16 - keyboards.default = { 17 - ids = ["*"]; 18 - settings.global = { 19 - overload_tap_timeout = 200; #ms 20 + systemd.packages = [stashPkg]; 21 + 22 + programs.niri = { 23 + enable = true; 24 + package = pkgs.niri; 20 25 }; 21 - settings.main = { 22 - compose = "layer(meta)"; 23 - leftmeta = "overload(meta, macro(leftmeta+z))"; 26 + 27 + # shoutout @CodedNil on gh for the fix 28 + # waiting on https://github.com/YaLTeR/niri/pull/1923 for a real fix 29 + services.keyd = { 30 + enable = true; 31 + keyboards.default = { 32 + ids = ["*"]; 33 + settings.global = { 34 + overload_tap_timeout = 200; #ms 35 + }; 36 + settings.main = { 37 + compose = "layer(meta)"; 38 + leftmeta = "overload(meta, macro(leftmeta+z))"; 39 + }; 40 + }; 24 41 }; 25 - }; 26 - }; 27 42 28 - # turns out i've been using this the whole time! 29 - # i believe niri uses this automatically, but it doesn't hurt to set it 30 - services.gnome.gnome-keyring.enable = true; 43 + # turns out i've been using this the whole time! 44 + # i believe niri uses this automatically, but it doesn't hurt to set it 45 + services.gnome.gnome-keyring.enable = true; 31 46 32 - systemd = { 33 - user.services.polkit-gnome-authentication-agent-1 = { 34 - description = "polkit-gnome-authentication-agent-1"; 35 - wantedBy = ["graphical-session.target"]; 36 - wants = ["graphical-session.target"]; 37 - after = ["graphical-session.target"]; 38 - serviceConfig = { 39 - Type = "simple"; 40 - ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; 41 - Restart = "on-failure"; 42 - RestartSec = 1; 43 - TimeoutStopSec = 10; 47 + systemd = { 48 + user.services.polkit-gnome-authentication-agent-1 = { 49 + description = "polkit-gnome-authentication-agent-1"; 50 + wantedBy = ["graphical-session.target"]; 51 + wants = ["graphical-session.target"]; 52 + after = ["graphical-session.target"]; 53 + serviceConfig = { 54 + Type = "simple"; 55 + ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; 56 + Restart = "on-failure"; 57 + RestartSec = 1; 58 + TimeoutStopSec = 10; 59 + }; 60 + }; 44 61 }; 45 62 }; 46 - }; 47 63 }
+16 -10
system/programs/plasma.nix
··· 1 1 { 2 - pkgs, 2 + config, 3 3 inputs, 4 + lib, 5 + pkgs, 4 6 ... 5 7 }: { 6 - services.desktopManager.plasma6.enable = true; 7 - environment.plasma6.excludePackages = with pkgs.kdePackages; [ 8 - kate 9 - okular 10 - ]; 8 + options.modules.programs.plasma.enable = lib.mkEnableOption "plasma support"; 11 9 12 - environment.systemPackages = with pkgs; [ 13 - inputs.kwin-effects-forceblur.packages.${pkgs.system}.default 14 - kdePackages.kconfig 15 - ]; 10 + config = lib.mkIf config.modules.programs.plasma.enable { 11 + services.desktopManager.plasma6.enable = true; 12 + environment.plasma6.excludePackages = with pkgs.kdePackages; [ 13 + kate 14 + okular 15 + ]; 16 + 17 + environment.systemPackages = with pkgs; [ 18 + inputs.kwin-effects-forceblur.packages.${pkgs.system}.default 19 + kdePackages.kconfig 20 + ]; 21 + }; 16 22 }
+13 -5
system/programs/steam.nix
··· 1 1 { 2 - programs.steam = { 3 - enable = true; 4 - remotePlay.openFirewall = true; 5 - dedicatedServer.openFirewall = true; 6 - localNetworkGameTransfers.openFirewall = true; 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.programs.steam.enable = lib.mkEnableOption "steam support"; 7 + 8 + config = lib.mkIf config.modules.programs.steam.enable { 9 + programs.steam = { 10 + enable = true; 11 + remotePlay.openFirewall = true; 12 + dedicatedServer.openFirewall = true; 13 + localNetworkGameTransfers.openFirewall = true; 14 + }; 7 15 }; 8 16 }
+23 -14
system/programs/xdg.nix
··· 1 - {pkgs, ...}: { 2 - xdg.portal = { 3 - enable = true; 4 - xdgOpenUsePortal = true; 5 - config = { 6 - common = { 7 - default = ["gnome" "gtk"]; 8 - "org.freedesktop.impl.portal.ScreenCast" = "gnome"; 9 - "org.freedesktop.impl.portal.Screenshot" = "gnome"; 10 - "org.freedesktop.impl.portal.RemoteDesktop" = "gnome"; 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.modules.programs.xdg.enable = lib.mkEnableOption "XDG support"; 8 + 9 + config = lib.mkIf config.modules.programs.xdg.enable { 10 + xdg.portal = { 11 + enable = true; 12 + xdgOpenUsePortal = true; 13 + config = { 14 + common = { 15 + default = ["gnome" "gtk"]; 16 + "org.freedesktop.impl.portal.ScreenCast" = "gnome"; 17 + "org.freedesktop.impl.portal.Screenshot" = "gnome"; 18 + "org.freedesktop.impl.portal.RemoteDesktop" = "gnome"; 19 + }; 11 20 }; 21 + extraPortals = [ 22 + pkgs.xdg-desktop-portal-gnome 23 + pkgs.xdg-desktop-portal-gtk 24 + ]; 12 25 }; 13 - extraPortals = [ 14 - pkgs.xdg-desktop-portal-gnome 15 - pkgs.xdg-desktop-portal-gtk 16 - ]; 17 26 }; 18 27 }
+8 -2
system/services/boot.nix
··· 1 1 { 2 - boot = { 3 - loader = { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.services.boot.enable = lib.mkEnableOption "boot (grub) support"; 7 + 8 + config = lib.mkIf config.modules.services.boot.enable { 9 + boot.loader = { 4 10 systemd-boot.enable = false; 5 11 efi.efiSysMountPoint = "/boot"; 6 12 efi.canTouchEfiVariables = true;
+13 -5
system/services/docker.nix
··· 1 1 { 2 - virtualisation.docker = { 3 - enable = true; 4 - enableOnBoot = false; 5 - }; 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.services.docker.enable = lib.mkEnableOption "docker support"; 6 7 7 - systemd.services."docker.socket".wantedBy = ["sockets.target"]; 8 + config = lib.mkIf config.modules.services.docker.enable { 9 + virtualisation.docker = { 10 + enable = true; 11 + enableOnBoot = false; 12 + }; 13 + 14 + systemd.services."docker.socket".wantedBy = ["sockets.target"]; 15 + }; 8 16 }
+16 -7
system/services/greetd.nix
··· 1 - {pkgs, ...}: { 2 - services.greetd = { 3 - enable = true; 4 - settings = { 5 - default_session = { 6 - command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --remember-session --asterisks --theme border=green;text=white;prompt=green;time=green;action=purple;button=green;container=black;input=white"; 7 - user = "greeter"; 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: { 7 + options.modules.services.greetd.enable = lib.mkEnableOption "greetd support"; 8 + 9 + config = lib.mkIf config.modules.services.greetd.enable { 10 + services.greetd = { 11 + enable = true; 12 + settings = { 13 + default_session = { 14 + command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --remember-session --asterisks --theme border=green;text=white;prompt=green;time=green;action=purple;button=green;container=black;input=white"; 15 + user = "greeter"; 16 + }; 8 17 }; 9 18 }; 10 19 };
-45
system/services/hibernation.nix
··· 1 - { 2 - config, 3 - lib, 4 - ... 5 - }: let 6 - cfg = config.services.hibernation; 7 - in { 8 - options.services.hibernation = { 9 - enable = lib.mkEnableOption "hibernation support"; 10 - 11 - swapDeviceUUID = lib.mkOption { 12 - type = lib.types.str; 13 - description = "UUID of the swap device for hibernation"; 14 - }; 15 - 16 - lidAction = lib.mkOption { 17 - type = lib.types.enum ["hibernate" "suspend" "suspend-then-hibernate" "ignore"]; 18 - default = "suspend-then-hibernate"; 19 - description = "action to take when laptop lid is closed"; 20 - }; 21 - 22 - hibernateDelay = lib.mkOption { 23 - type = lib.types.str; 24 - default = "30m"; 25 - description = "delay before hibernating after suspend"; 26 - }; 27 - }; 28 - 29 - config = lib.mkIf cfg.enable { 30 - boot.kernelParams = ["resume=UUID=${cfg.swapDeviceUUID}"]; 31 - boot.resumeDevice = "/dev/disk/by-uuid/${cfg.swapDeviceUUID}"; 32 - 33 - powerManagement.enable = true; 34 - 35 - services.logind.settings.Login = { 36 - HandleLidSwitch = cfg.lidAction; 37 - HandleLidSwitchDocked = "ignore"; 38 - HandlePowerKey = "hibernate"; 39 - }; 40 - 41 - systemd.sleep.extraConfig = '' 42 - HibernateDelaySec=${cfg.hibernateDelay} 43 - ''; 44 - }; 45 - }
+20
system/services/network.nix
··· 1 + { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.services.network.enable = lib.mkEnableOption "networking support"; 7 + 8 + config = lib.mkIf config.modules.services.network.enable { 9 + networking = { 10 + networkmanager = { 11 + enable = true; 12 + wifi.powersave = false; 13 + wifi.scanRandMacAddress = false; 14 + }; 15 + firewall.enable = true; 16 + }; 17 + 18 + systemd.services.NetworkManager-wait-online.enable = false; 19 + }; 20 + }
+9 -1
system/services/openssh.nix
··· 1 1 { 2 - services.openssh.enable = true; 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.services.openssh.enable = lib.mkEnableOption "openssh support"; 7 + 8 + config = lib.mkIf config.modules.services.openssh.enable { 9 + services.openssh.enable = true; 10 + }; 3 11 }
+12 -4
system/services/openvpn.nix
··· 1 1 { 2 - services.openvpn.servers = { 3 - mruVPN = { 4 - config = ''config /home/matthew_hre/.config/openvpn/mruVPN.conf ''; 5 - autoStart = false; 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.services.openvpn.enable = lib.mkEnableOption "openvpn support"; 7 + 8 + config = lib.mkIf config.modules.services.openvpn.enable { 9 + services.openvpn.servers = { 10 + mruVPN = { 11 + config = ''config /home/matthew_hre/.config/openvpn/mruVPN.conf ''; 12 + autoStart = false; 13 + }; 6 14 }; 7 15 }; 8 16 }
+23 -15
system/services/pipewire.nix
··· 1 1 { 2 - services.pulseaudio.enable = false; 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.services.pipewire.enable = lib.mkEnableOption "pipewire support"; 3 7 4 - services.pipewire = { 5 - enable = true; 6 - alsa.enable = true; 7 - alsa.support32Bit = true; 8 - pulse.enable = true; 9 - jack.enable = true; 10 - }; 8 + config = lib.mkIf config.modules.services.pipewire.enable { 9 + services.pulseaudio.enable = false; 11 10 12 - services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = { 13 - "monitor.bluez.properties" = { 14 - "bluez5.enable-sbc-xq" = true; 15 - "bluez5.enable-msbc" = false; 16 - "bluez5.enable-hw-volume" = true; ### <<< Enables touch slider on headphones for fader gain, pause, and unpause functionality 17 - "bluez5.auto-connect" = ["a2dp_sink"]; ### <<< Autoconnect to HD 48khz mode on connect 18 - "bluez5.roles" = ["a2dp_sink" "a2dp_source"]; ### <<< This sets the BT driver role to a2dp sink and source, which are the HD 44.1khz and 48khz module modesets but doesnt load the modules for hsp, which is the handset driver that enables the mic. 11 + services.pipewire = { 12 + enable = true; 13 + alsa.enable = true; 14 + alsa.support32Bit = true; 15 + pulse.enable = true; 16 + jack.enable = true; 17 + }; 18 + 19 + services.pipewire.wireplumber.extraConfig.bluetoothEnhancements = { 20 + "monitor.bluez.properties" = { 21 + "bluez5.enable-sbc-xq" = true; 22 + "bluez5.enable-msbc" = false; 23 + "bluez5.enable-hw-volume" = true; ### <<< Enables touch slider on headphones for fader gain, pause, and unpause functionality 24 + "bluez5.auto-connect" = ["a2dp_sink"]; ### <<< Autoconnect to HD 48khz mode on connect 25 + "bluez5.roles" = ["a2dp_sink" "a2dp_source"]; ### <<< This sets the BT driver role to a2dp sink and source, which are the HD 44.1khz and 48khz module modesets but doesnt load the modules for hsp, which is the handset driver that enables the mic. 26 + }; 19 27 }; 20 28 }; 21 29 }
+21 -13
system/services/power.nix
··· 1 1 { 2 - services.power-profiles-daemon.enable = false; 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.services.power.enable = lib.mkEnableOption "power support"; 3 7 4 - services.tlp = { 5 - enable = true; 6 - settings = { 7 - TLP_DEFAULT_MODE = "BAT"; 8 + config = lib.mkIf config.modules.services.power.enable { 9 + services.power-profiles-daemon.enable = false; 8 10 9 - CPU_SCALING_GOVERNOR_ON_AC = "performance"; 10 - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; 11 + services.tlp = { 12 + enable = true; 13 + settings = { 14 + TLP_DEFAULT_MODE = "BAT"; 11 15 12 - CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; 13 - CPU_ENERGY_PERF_POLICY_ON_AC = "power"; 16 + CPU_SCALING_GOVERNOR_ON_AC = "performance"; 17 + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; 18 + 19 + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; 20 + CPU_ENERGY_PERF_POLICY_ON_AC = "power"; 14 21 15 - CPU_MIN_PERF_ON_AC = 0; 16 - CPU_MAX_PERF_ON_AC = 100; 17 - CPU_MIN_PERF_ON_BAT = 0; 18 - CPU_MAX_PERF_ON_BAT = 75; 22 + CPU_MIN_PERF_ON_AC = 0; 23 + CPU_MAX_PERF_ON_AC = 100; 24 + CPU_MIN_PERF_ON_BAT = 0; 25 + CPU_MAX_PERF_ON_BAT = 75; 26 + }; 19 27 }; 20 28 }; 21 29 }
+32
system/services/security.nix
··· 1 + { 2 + config, 3 + lib, 4 + ... 5 + }: { 6 + options.modules.services.security = { 7 + enable = lib.mkEnableOption "base security"; 8 + fingerprintPam.enable = lib.mkEnableOption "fingerprint PAM integration"; 9 + }; 10 + 11 + config = let 12 + cfg = config.modules.services.security; 13 + in 14 + lib.mkMerge [ 15 + { 16 + security.sudo.enable = true; 17 + security.rtkit.enable = true; 18 + } 19 + 20 + (lib.mkIf cfg.fingerprintPam.enable { 21 + security.pam.services = { 22 + hyprlock = { 23 + text = "auth include login"; 24 + enableGnomeKeyring = true; 25 + }; 26 + "polkit-1".fprintAuth = true; 27 + greetd.enableGnomeKeyring = true; 28 + login.enableGnomeKeyring = true; 29 + }; 30 + }) 31 + ]; 32 + }
-15
system/shared/default.nix
··· 1 - {lib, ...}: { 2 - imports = [ 3 - ./programs.nix 4 - ./services.nix 5 - ./packages.nix 6 - ]; 7 - 8 - environment.sessionVariables = { 9 - NIXOS_OZONE_WL = "1"; 10 - 11 - # ELECTRON_OZONE_PLATFORM_HINT can be overridden per host 12 - # mainly due to some kde issues 13 - ELECTRON_OZONE_PLATFORM_HINT = lib.mkDefault "wayland"; 14 - }; 15 - }
-15
system/shared/packages.nix
··· 1 - {pkgs, ...}: { 2 - environment.systemPackages = with pkgs; [ 3 - libnotify 4 - nomacs 5 - obsidian 6 - vim 7 - 8 - (pkgs.writeShellScriptBin "rebuild" '' 9 - sudo nixos-rebuild switch --flake ~/nix-config#$HOSTNAME 2>&1 | nom 10 - '') 11 - (pkgs.writeShellScriptBin "rebuild-test" '' 12 - sudo nixos-rebuild test --flake ~/nix-config#$HOSTNAME 2>&1 | nom 13 - '') 14 - ]; 15 - }
-13
system/shared/programs.nix
··· 1 - {...}: { 2 - programs = { 3 - firefox = { 4 - enable = true; 5 - }; 6 - fish.enable = true; 7 - _1password-gui = { 8 - enable = true; 9 - polkitPolicyOwners = ["matthew_hre"]; 10 - }; 11 - wireshark.enable = true; 12 - }; 13 - }
-16
system/shared/services.nix
··· 1 - {...}: { 2 - # Enable CUPS to print documents. 3 - services.printing.enable = true; 4 - 5 - # Enable OpenGL 6 - hardware.graphics = { 7 - enable = true; 8 - enable32Bit = true; 9 - }; 10 - 11 - # Configure keymap in X11 12 - services.xserver.xkb = { 13 - layout = "us"; 14 - variant = ""; 15 - }; 16 - }
+63
users/matthew_hre/default.nix
··· 1 + {pkgs, ...}: { 2 + # System-level user definition 3 + users.users.matthew_hre = { 4 + isNormalUser = true; 5 + home = "/home/matthew_hre"; 6 + description = "Matthew Hrehirchuk"; 7 + extraGroups = ["wheel" "networkmanager" "docker" "wireshark"]; 8 + shell = pkgs.fish; 9 + }; 10 + 11 + users.defaultUserShell = pkgs.fish; 12 + 13 + home-manager.users.matthew_hre = { 14 + imports = [ 15 + ../../home/configs 16 + ../../home/editors 17 + ../../home/shell 18 + ]; 19 + 20 + home = { 21 + username = "matthew_hre"; 22 + homeDirectory = "/home/matthew_hre"; 23 + stateVersion = "23.11"; 24 + 25 + packages = with pkgs; [ 26 + zip 27 + xz 28 + unzip 29 + p7zip 30 + ripgrep 31 + eza 32 + fd 33 + television 34 + gh 35 + lazygit 36 + lazydocker 37 + alejandra 38 + nix-output-monitor 39 + glow 40 + strace 41 + ltrace 42 + pciutils 43 + usbutils 44 + xclip 45 + wireshark 46 + ]; 47 + 48 + sessionVariables = { 49 + QT_QPA_PLATFORM = "wayland"; 50 + SDL_VIDEODRIVER = "wayland"; 51 + XDG_SESSION_TYPE = "wayland"; 52 + EDITOR = "nvim"; 53 + BROWSER = "firefox"; 54 + TERMINAL = "ghostty"; 55 + DELTA_PAGER = "less -R"; 56 + MANPAGER = "sh -c 'col -bx | bat -l man -p'"; 57 + MANROFFOPT = "-c"; 58 + }; 59 + }; 60 + 61 + programs.home-manager.enable = true; 62 + }; 63 + }
+23
users/matthew_hre/thwomp.nix
··· 1 + { 2 + imports = [./default.nix]; 3 + 4 + home-manager.users.matthew_hre.home = { 5 + bat.enable = true; 6 + btop.enable = true; 7 + btop.amdGpuSupport = true; 8 + direnv.enable = true; 9 + fastfetch.enable = true; 10 + fuzzel.enable = true; 11 + garbage.enable = true; 12 + git.enable = true; 13 + ssh.enable = true; 14 + vicinae.enable = false; 15 + 16 + editors.helix.enable = true; 17 + editors.nvf.enable = true; 18 + editors.vscode.enable = true; 19 + 20 + shell.fish.enable = true; 21 + shell.ghostty.enable = true; 22 + }; 23 + }
+37
users/matthew_hre/toad.nix
··· 1 + {inputs, ...}: { 2 + imports = [./default.nix]; 3 + 4 + home-manager.users.matthew_hre = { 5 + imports = [ 6 + # niri needs to be specified here, since 7 + # it builds from source regardless of whether 8 + # it's enabled or not, and i don't want it 9 + # on thwomp 10 + inputs.niri.homeModules.niri 11 + ../../home/wayland 12 + ]; 13 + 14 + home = { 15 + bat.enable = true; 16 + btop.enable = true; 17 + direnv.enable = true; 18 + fastfetch.enable = true; 19 + fuzzel.enable = true; 20 + garbage.enable = true; 21 + git.enable = true; 22 + ssh.enable = true; 23 + vicinae.enable = true; 24 + 25 + editors.helix.enable = true; 26 + editors.nvf.enable = true; 27 + editors.vscode.enable = true; 28 + 29 + shell.fish.enable = true; 30 + shell.ghostty.enable = true; 31 + 32 + wayland.enable = true; 33 + wayland.waybar.enable = false; 34 + wayland.quickshell.enable = true; 35 + }; 36 + }; 37 + }