the configuration for all my nixos machines (hacky! bad! ugly!)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

massive refactoring and new config options all around!

Mostly stolen from orual...

+2037 -315
-11
all.nix
··· 1 - # Configuration options I want set on every system. 2 - { config, pkgs, lib, ... }: 3 - { 4 - nix = { 5 - settings.experimental-features = ["nix-command" "flakes"]; 6 - gc = { 7 - automatic = true; 8 - dates = "monthly"; 9 - }; 10 - }; 11 - }
-149
dt-common.nix
··· 1 - # dt-common.nix: configuration common to every computer where I have a desktop 2 - # environment. 3 - { config, pkgs, lib, ... }: 4 - { 5 - networking.networkmanager.enable = true; 6 - 7 - virtualisation = { 8 - containers.enable = true; 9 - docker = { 10 - enable = true; 11 - }; 12 - }; 13 - 14 - # this allows for rootless container runtimes to set resource limits. Still 15 - # not using this yet because there are some kinks with rootless runtimes, but 16 - # hopefully I will eventually. 17 - systemd.services."user@".serviceConfig.Delegate="cpu cpuset io memory pids"; 18 - 19 - systemd.packages = [( 20 - pkgs.writeTextFile { 21 - name = "delegate.conf"; 22 - text = '' 23 - [Service] 24 - Delegate=yes 25 - ''; 26 - destination = "/etc/systemd/system/user@.service.d/delegate.conf"; 27 - } 28 - )]; 29 - 30 - # Set your time zone. 31 - time.timeZone = "America/New_York"; 32 - 33 - # Select internationalisation properties. 34 - i18n.defaultLocale = "en_US.UTF-8"; 35 - 36 - i18n.extraLocaleSettings = { 37 - LC_ADDRESS = "en_US.UTF-8"; 38 - LC_IDENTIFICATION = "en_US.UTF-8"; 39 - LC_MEASUREMENT = "en_US.UTF-8"; 40 - LC_MONETARY = "en_US.UTF-8"; 41 - LC_NAME = "en_US.UTF-8"; 42 - LC_NUMERIC = "en_US.UTF-8"; 43 - LC_PAPER = "en_US.UTF-8"; 44 - LC_TELEPHONE = "en_US.UTF-8"; 45 - LC_TIME = "en_US.UTF-8"; 46 - }; 47 - 48 - # TODO move to niri 49 - # Enable the X11 windowing system. 50 - # You can disable this if you're only using the Wayland session. 51 - services.xserver.enable = true; 52 - 53 - # Enable the KDE Plasma Desktop Environment. 54 - services.displayManager.sddm.enable = true; 55 - services.desktopManager.plasma6.enable = true; 56 - 57 - # Configure keymap in X11 58 - services.xserver.xkb = { 59 - layout = "us"; 60 - variant = ""; 61 - options = "ctrl:swapcaps,compose:ralt"; 62 - }; 63 - console.useXkbConfig = true; 64 - 65 - # Enable CUPS to print documents. 66 - services.printing.enable = true; 67 - 68 - # Enable sound with pipewire. 69 - services.pulseaudio.enable = false; 70 - security.rtkit.enable = true; 71 - services.pipewire = { 72 - enable = true; 73 - alsa.enable = true; 74 - alsa.support32Bit = true; 75 - pulse.enable = true; 76 - # If you want to use JACK applications, uncomment this 77 - #jack.enable = true; 78 - 79 - # use the example session manager (no others are packaged yet so this is enabled by default, 80 - # no need to redefine it in your config for now) 81 - #media-session.enable = true; 82 - }; 83 - users.users.joshua = { 84 - subUidRanges = [ { startUid = 100000; count = 65536; } ]; 85 - subGidRanges = [ { startGid = 100000; count = 65536; } ]; 86 - isNormalUser = true; 87 - description = "Joshua Barrett"; 88 - shell = pkgs.zsh; 89 - extraGroups = [ "networkmanager" "wheel" "docker" ]; 90 - packages = with pkgs; [ 91 - 92 - ]; 93 - }; 94 - home-manager.useGlobalPkgs = true; 95 - home-manager.useUserPackages = true; 96 - home-manager.users.joshua = ./home-manager/home.nix; 97 - 98 - # Install firefox. 99 - programs.firefox.enable = true; 100 - programs.zsh.enable = true; 101 - programs.foot.enable = true; 102 - programs.git.enable = true; 103 - programs.ssh.startAgent = true; 104 - 105 - # Install steam 106 - programs.steam = { 107 - enable = true; 108 - remotePlay.openFirewall = true; 109 - localNetworkGameTransfers.openFirewall = true; 110 - }; 111 - 112 - # Allow unfree packages 113 - nixpkgs.config.allowUnfree = true; 114 - 115 - services.syncthing.openDefaultPorts = true; 116 - 117 - environment.systemPackages = with pkgs; [ 118 - gcc 119 - gnumake 120 - bison 121 - flex 122 - autoconf 123 - automake 124 - libtool 125 - discord 126 - calibre 127 - libreoffice 128 - enchant 129 - rustup 130 - pkg-config 131 - passt 132 - # vim # Do not forget to add an editor to edit configuration.nix! The Nano 133 - # editor is also installed by default. wget 134 - ]; 135 - networking.nftables.enable = true; 136 - networking.firewall = { 137 - enable = true; 138 - trustedInterfaces = [ "tailscale0" ]; 139 - allowedUDPPorts = [ config.services.tailscale.port ]; 140 - }; 141 - 142 - systemd.services.tailscaled.serviceConfig.Environment = [ 143 - "TS_DEBUG_FIREWALL_MODE=nftables" 144 - ]; 145 - services.tailscale.enable = true; 146 - services.resolved.enable = true; 147 - systemd.network.wait-online.enable = false; 148 - boot.initrd.systemd.network.wait-online.enable = false; 149 - }
+699 -10
flake.lock
··· 1 1 { 2 2 "nodes": { 3 - "home-manager": { 3 + "base16": { 4 + "inputs": { 5 + "fromYaml": "fromYaml" 6 + }, 7 + "locked": { 8 + "lastModified": 1755819240, 9 + "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", 10 + "owner": "SenchoPens", 11 + "repo": "base16.nix", 12 + "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", 13 + "type": "github" 14 + }, 15 + "original": { 16 + "owner": "SenchoPens", 17 + "repo": "base16.nix", 18 + "type": "github" 19 + } 20 + }, 21 + "base16-fish": { 22 + "flake": false, 23 + "locked": { 24 + "lastModified": 1765809053, 25 + "narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=", 26 + "owner": "tomyun", 27 + "repo": "base16-fish", 28 + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", 29 + "type": "github" 30 + }, 31 + "original": { 32 + "owner": "tomyun", 33 + "repo": "base16-fish", 34 + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", 35 + "type": "github" 36 + } 37 + }, 38 + "base16-helix": { 39 + "flake": false, 40 + "locked": { 41 + "lastModified": 1760703920, 42 + "narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=", 43 + "owner": "tinted-theming", 44 + "repo": "base16-helix", 45 + "rev": "d646af9b7d14bff08824538164af99d0c521b185", 46 + "type": "github" 47 + }, 48 + "original": { 49 + "owner": "tinted-theming", 50 + "repo": "base16-helix", 51 + "type": "github" 52 + } 53 + }, 54 + "base16-vim": { 55 + "flake": false, 56 + "locked": { 57 + "lastModified": 1732806396, 58 + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", 59 + "owner": "tinted-theming", 60 + "repo": "base16-vim", 61 + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", 62 + "type": "github" 63 + }, 64 + "original": { 65 + "owner": "tinted-theming", 66 + "repo": "base16-vim", 67 + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", 68 + "type": "github" 69 + } 70 + }, 71 + "firefox-gnome-theme": { 72 + "flake": false, 73 + "locked": { 74 + "lastModified": 1764873433, 75 + "narHash": "sha256-1XPewtGMi+9wN9Ispoluxunw/RwozuTRVuuQOmxzt+A=", 76 + "owner": "rafaelmardojai", 77 + "repo": "firefox-gnome-theme", 78 + "rev": "f7ffd917ac0d253dbd6a3bf3da06888f57c69f92", 79 + "type": "github" 80 + }, 81 + "original": { 82 + "owner": "rafaelmardojai", 83 + "repo": "firefox-gnome-theme", 84 + "type": "github" 85 + } 86 + }, 87 + "flake-compat": { 88 + "locked": { 89 + "lastModified": 1761640442, 90 + "narHash": "sha256-AtrEP6Jmdvrqiv4x2xa5mrtaIp3OEe8uBYCDZDS+hu8=", 91 + "owner": "nix-community", 92 + "repo": "flake-compat", 93 + "rev": "4a56054d8ffc173222d09dad23adf4ba946c8884", 94 + "type": "github" 95 + }, 96 + "original": { 97 + "owner": "nix-community", 98 + "repo": "flake-compat", 99 + "type": "github" 100 + } 101 + }, 102 + "flake-parts": { 103 + "inputs": { 104 + "nixpkgs-lib": [ 105 + "stylix", 106 + "nixpkgs" 107 + ] 108 + }, 109 + "locked": { 110 + "lastModified": 1767609335, 111 + "narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=", 112 + "owner": "hercules-ci", 113 + "repo": "flake-parts", 114 + "rev": "250481aafeb741edfe23d29195671c19b36b6dca", 115 + "type": "github" 116 + }, 117 + "original": { 118 + "owner": "hercules-ci", 119 + "repo": "flake-parts", 120 + "type": "github" 121 + } 122 + }, 123 + "flake-utils": { 124 + "inputs": { 125 + "systems": "systems" 126 + }, 127 + "locked": { 128 + "lastModified": 1731533236, 129 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 130 + "owner": "numtide", 131 + "repo": "flake-utils", 132 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 133 + "type": "github" 134 + }, 135 + "original": { 136 + "owner": "numtide", 137 + "repo": "flake-utils", 138 + "type": "github" 139 + } 140 + }, 141 + "fromYaml": { 142 + "flake": false, 143 + "locked": { 144 + "lastModified": 1731966426, 145 + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", 146 + "owner": "SenchoPens", 147 + "repo": "fromYaml", 148 + "rev": "106af9e2f715e2d828df706c386a685698f3223b", 149 + "type": "github" 150 + }, 151 + "original": { 152 + "owner": "SenchoPens", 153 + "repo": "fromYaml", 154 + "type": "github" 155 + } 156 + }, 157 + "gnome-shell": { 158 + "flake": false, 159 + "locked": { 160 + "host": "gitlab.gnome.org", 161 + "lastModified": 1767737596, 162 + "narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=", 163 + "owner": "GNOME", 164 + "repo": "gnome-shell", 165 + "rev": "ef02db02bf0ff342734d525b5767814770d85b49", 166 + "type": "gitlab" 167 + }, 168 + "original": { 169 + "host": "gitlab.gnome.org", 170 + "owner": "GNOME", 171 + "ref": "gnome-49", 172 + "repo": "gnome-shell", 173 + "type": "gitlab" 174 + } 175 + }, 176 + "home": { 4 177 "inputs": { 5 178 "nixpkgs": [ 6 179 "nixpkgs" 7 180 ] 8 181 }, 9 182 "locked": { 10 - "lastModified": 1772985285, 11 - "narHash": "sha256-wEEmvfqJcl9J0wyMgMrj1TixOgInBW/6tLPhWGoZE3s=", 183 + "lastModified": 1773422513, 184 + "narHash": "sha256-MPjR48roW7CUMU6lu0+qQGqj92Kuh3paIulMWFZy+NQ=", 12 185 "owner": "nix-community", 13 186 "repo": "home-manager", 14 - "rev": "5be5d8245cbc7bc0c09fbb5f38f23f223c543f85", 187 + "rev": "ef12a9a2b0f77c8fa3dda1e7e494fca668909056", 15 188 "type": "github" 16 189 }, 17 190 "original": { ··· 20 193 "type": "github" 21 194 } 22 195 }, 196 + "lib-aggregate": { 197 + "inputs": { 198 + "flake-utils": "flake-utils", 199 + "nixpkgs-lib": "nixpkgs-lib" 200 + }, 201 + "locked": { 202 + "lastModified": 1772974622, 203 + "narHash": "sha256-HIY4FEug/QVPF669+8A0ztFV1hC3d5Z+M6aL5J7AZNQ=", 204 + "owner": "nix-community", 205 + "repo": "lib-aggregate", 206 + "rev": "55e6cfb4549362ed408875eee0f92cfde7ccda4e", 207 + "type": "github" 208 + }, 209 + "original": { 210 + "owner": "nix-community", 211 + "repo": "lib-aggregate", 212 + "type": "github" 213 + } 214 + }, 215 + "niri": { 216 + "inputs": { 217 + "niri-stable": "niri-stable", 218 + "niri-unstable": "niri-unstable", 219 + "nixpkgs": "nixpkgs", 220 + "nixpkgs-stable": "nixpkgs-stable", 221 + "xwayland-satellite-stable": "xwayland-satellite-stable", 222 + "xwayland-satellite-unstable": "xwayland-satellite-unstable" 223 + }, 224 + "locked": { 225 + "lastModified": 1773390002, 226 + "narHash": "sha256-0RVjh9h0sgPHngxEs/Wd2/xdGsgKgZWjxFu5JsX3ASw=", 227 + "owner": "sodiboo", 228 + "repo": "niri-flake", 229 + "rev": "adc63b19724247f947385381481effd225a6e2fc", 230 + "type": "github" 231 + }, 232 + "original": { 233 + "owner": "sodiboo", 234 + "repo": "niri-flake", 235 + "type": "github" 236 + } 237 + }, 238 + "niri-stable": { 239 + "flake": false, 240 + "locked": { 241 + "lastModified": 1756556321, 242 + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", 243 + "owner": "YaLTeR", 244 + "repo": "niri", 245 + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", 246 + "type": "github" 247 + }, 248 + "original": { 249 + "owner": "YaLTeR", 250 + "ref": "v25.08", 251 + "repo": "niri", 252 + "type": "github" 253 + } 254 + }, 255 + "niri-unstable": { 256 + "flake": false, 257 + "locked": { 258 + "lastModified": 1773130184, 259 + "narHash": "sha256-3bwx4WqCB06yfQIGB+OgIckOkEDyKxiTD5pOo4Xz2rI=", 260 + "owner": "YaLTeR", 261 + "repo": "niri", 262 + "rev": "b07bde3ee82dd73115e6b949e4f3f63695da35ea", 263 + "type": "github" 264 + }, 265 + "original": { 266 + "owner": "YaLTeR", 267 + "repo": "niri", 268 + "type": "github" 269 + } 270 + }, 271 + "nix-monitored": { 272 + "inputs": { 273 + "nixpkgs": "nixpkgs_2" 274 + }, 275 + "locked": { 276 + "lastModified": 1745680380, 277 + "narHash": "sha256-Z8PknjkmIr/8ZCH+dmc2Pc+UltiOr7/oKg37PXuVvuU=", 278 + "owner": "ners", 279 + "repo": "nix-monitored", 280 + "rev": "60f3baa4701d58eab86c2d1d9c3d7e820074d461", 281 + "type": "github" 282 + }, 283 + "original": { 284 + "owner": "ners", 285 + "repo": "nix-monitored", 286 + "type": "github" 287 + } 288 + }, 23 289 "nixpkgs": { 24 290 "locked": { 25 - "lastModified": 1772963539, 26 - "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=", 291 + "lastModified": 1773282481, 292 + "narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=", 27 293 "owner": "NixOS", 28 294 "repo": "nixpkgs", 29 - "rev": "9dcb002ca1690658be4a04645215baea8b95f31d", 295 + "rev": "fe416aaedd397cacb33a610b33d60ff2b431b127", 30 296 "type": "github" 31 297 }, 32 298 "original": { ··· 36 302 "type": "github" 37 303 } 38 304 }, 305 + "nixpkgs-lib": { 306 + "locked": { 307 + "lastModified": 1772933218, 308 + "narHash": "sha256-hohiyWALn8cXqk3FPnE3UADy03lRMaTV5iRzKCU86zM=", 309 + "owner": "nix-community", 310 + "repo": "nixpkgs.lib", 311 + "rev": "7489b10b9d10953341b448ed8f30c96999baef2c", 312 + "type": "github" 313 + }, 314 + "original": { 315 + "owner": "nix-community", 316 + "repo": "nixpkgs.lib", 317 + "type": "github" 318 + } 319 + }, 39 320 "nixpkgs-stable": { 321 + "locked": { 322 + "lastModified": 1773222311, 323 + "narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=", 324 + "owner": "NixOS", 325 + "repo": "nixpkgs", 326 + "rev": "0590cd39f728e129122770c029970378a79d076a", 327 + "type": "github" 328 + }, 329 + "original": { 330 + "owner": "NixOS", 331 + "ref": "nixos-25.11", 332 + "repo": "nixpkgs", 333 + "type": "github" 334 + } 335 + }, 336 + "nixpkgs-stable_2": { 40 337 "locked": { 41 338 "lastModified": 1773068389, 42 339 "narHash": "sha256-vMrm7Pk2hjBRPnCSjhq1pH0bg350Z+pXhqZ9ICiqqCs=", ··· 52 349 "type": "github" 53 350 } 54 351 }, 352 + "nixpkgs-wayland": { 353 + "inputs": { 354 + "flake-compat": "flake-compat", 355 + "lib-aggregate": "lib-aggregate", 356 + "nixpkgs": "nixpkgs_4" 357 + }, 358 + "locked": { 359 + "lastModified": 1773409378, 360 + "narHash": "sha256-9NARQANYlp2sSvxaZYG3WAWRmSk01lwx9sxUSjQ3VOw=", 361 + "owner": "nix-community", 362 + "repo": "nixpkgs-wayland", 363 + "rev": "c3ff72acdf5e909dc92719f491ce98f135a4aabe", 364 + "type": "github" 365 + }, 366 + "original": { 367 + "owner": "nix-community", 368 + "repo": "nixpkgs-wayland", 369 + "type": "github" 370 + } 371 + }, 372 + "nixpkgs_2": { 373 + "locked": { 374 + "lastModified": 1745526057, 375 + "narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", 376 + "owner": "NixOS", 377 + "repo": "nixpkgs", 378 + "rev": "f771eb401a46846c1aebd20552521b233dd7e18b", 379 + "type": "github" 380 + }, 381 + "original": { 382 + "owner": "NixOS", 383 + "ref": "nixos-unstable", 384 + "repo": "nixpkgs", 385 + "type": "github" 386 + } 387 + }, 388 + "nixpkgs_3": { 389 + "locked": { 390 + "lastModified": 1772963539, 391 + "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=", 392 + "owner": "NixOS", 393 + "repo": "nixpkgs", 394 + "rev": "9dcb002ca1690658be4a04645215baea8b95f31d", 395 + "type": "github" 396 + }, 397 + "original": { 398 + "owner": "NixOS", 399 + "ref": "nixos-unstable", 400 + "repo": "nixpkgs", 401 + "type": "github" 402 + } 403 + }, 404 + "nixpkgs_4": { 405 + "locked": { 406 + "lastModified": 1773282481, 407 + "narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=", 408 + "owner": "nixos", 409 + "repo": "nixpkgs", 410 + "rev": "fe416aaedd397cacb33a610b33d60ff2b431b127", 411 + "type": "github" 412 + }, 413 + "original": { 414 + "owner": "nixos", 415 + "ref": "nixos-unstable", 416 + "repo": "nixpkgs", 417 + "type": "github" 418 + } 419 + }, 420 + "nixpkgs_5": { 421 + "locked": { 422 + "lastModified": 1770107345, 423 + "narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=", 424 + "owner": "nixos", 425 + "repo": "nixpkgs", 426 + "rev": "4533d9293756b63904b7238acb84ac8fe4c8c2c4", 427 + "type": "github" 428 + }, 429 + "original": { 430 + "owner": "nixos", 431 + "ref": "nixpkgs-unstable", 432 + "repo": "nixpkgs", 433 + "type": "github" 434 + } 435 + }, 436 + "noctalia": { 437 + "inputs": { 438 + "nixpkgs": [ 439 + "nixpkgs" 440 + ], 441 + "noctalia-qs": [ 442 + "noctalia-qs" 443 + ] 444 + }, 445 + "locked": { 446 + "lastModified": 1773426896, 447 + "narHash": "sha256-InonCkzlnCdsku697Eg+Jd36YVHUb/YL2BG1XZ7Eoi8=", 448 + "owner": "noctalia-dev", 449 + "repo": "noctalia-shell", 450 + "rev": "0bdf5afd2cf51fdcc5fe95b5205e6f6f3f0a9183", 451 + "type": "github" 452 + }, 453 + "original": { 454 + "owner": "noctalia-dev", 455 + "repo": "noctalia-shell", 456 + "type": "github" 457 + } 458 + }, 459 + "noctalia-qs": { 460 + "inputs": { 461 + "nixpkgs": [ 462 + "nixpkgs" 463 + ], 464 + "systems": "systems_2", 465 + "treefmt-nix": "treefmt-nix" 466 + }, 467 + "locked": { 468 + "lastModified": 1773277895, 469 + "narHash": "sha256-pK01O5J9ogI4rVtDI+PVxckaXqpYZ4uthY0vgVWdyl8=", 470 + "owner": "noctalia-dev", 471 + "repo": "noctalia-qs", 472 + "rev": "d5209a6b5fe8c6dff8d530e820c96f09830011e3", 473 + "type": "github" 474 + }, 475 + "original": { 476 + "owner": "noctalia-dev", 477 + "repo": "noctalia-qs", 478 + "type": "github" 479 + } 480 + }, 481 + "nur": { 482 + "inputs": { 483 + "flake-parts": [ 484 + "stylix", 485 + "flake-parts" 486 + ], 487 + "nixpkgs": [ 488 + "stylix", 489 + "nixpkgs" 490 + ] 491 + }, 492 + "locked": { 493 + "lastModified": 1767810917, 494 + "narHash": "sha256-ZKqhk772+v/bujjhla9VABwcvz+hB2IaRyeLT6CFnT0=", 495 + "owner": "nix-community", 496 + "repo": "NUR", 497 + "rev": "dead29c804adc928d3a69dfe7f9f12d0eec1f1a4", 498 + "type": "github" 499 + }, 500 + "original": { 501 + "owner": "nix-community", 502 + "repo": "NUR", 503 + "type": "github" 504 + } 505 + }, 55 506 "root": { 56 507 "inputs": { 57 - "home-manager": "home-manager", 58 - "nixpkgs": "nixpkgs", 59 - "nixpkgs-stable": "nixpkgs-stable" 508 + "home": "home", 509 + "niri": "niri", 510 + "nix-monitored": "nix-monitored", 511 + "nixpkgs": "nixpkgs_3", 512 + "nixpkgs-stable": "nixpkgs-stable_2", 513 + "nixpkgs-wayland": "nixpkgs-wayland", 514 + "noctalia": "noctalia", 515 + "noctalia-qs": "noctalia-qs", 516 + "rust-overlay": "rust-overlay", 517 + "stylix": "stylix" 518 + } 519 + }, 520 + "rust-overlay": { 521 + "inputs": { 522 + "nixpkgs": [ 523 + "nixpkgs" 524 + ] 525 + }, 526 + "locked": { 527 + "lastModified": 1773371126, 528 + "narHash": "sha256-SGnZQO8hnynR90Lo/1MVrTScsOPx9i26XjqSqoFOZ4E=", 529 + "owner": "oxalica", 530 + "repo": "rust-overlay", 531 + "rev": "475826b105eb52f39bd3281f60c052299e64d085", 532 + "type": "github" 533 + }, 534 + "original": { 535 + "owner": "oxalica", 536 + "repo": "rust-overlay", 537 + "type": "github" 538 + } 539 + }, 540 + "stylix": { 541 + "inputs": { 542 + "base16": "base16", 543 + "base16-fish": "base16-fish", 544 + "base16-helix": "base16-helix", 545 + "base16-vim": "base16-vim", 546 + "firefox-gnome-theme": "firefox-gnome-theme", 547 + "flake-parts": "flake-parts", 548 + "gnome-shell": "gnome-shell", 549 + "nixpkgs": [ 550 + "nixpkgs" 551 + ], 552 + "nur": "nur", 553 + "systems": "systems_3", 554 + "tinted-foot": "tinted-foot", 555 + "tinted-kitty": "tinted-kitty", 556 + "tinted-schemes": "tinted-schemes", 557 + "tinted-tmux": "tinted-tmux", 558 + "tinted-zed": "tinted-zed" 559 + }, 560 + "locked": { 561 + "lastModified": 1772296853, 562 + "narHash": "sha256-pAtzPsgHRKw/2Kv8HgAjSJg450FDldHPWsP3AKG/Xj0=", 563 + "owner": "danth", 564 + "repo": "stylix", 565 + "rev": "c4b8e80a1020e09a1f081ad0f98ce804a6e85acf", 566 + "type": "github" 567 + }, 568 + "original": { 569 + "owner": "danth", 570 + "repo": "stylix", 571 + "type": "github" 572 + } 573 + }, 574 + "systems": { 575 + "locked": { 576 + "lastModified": 1681028828, 577 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 578 + "owner": "nix-systems", 579 + "repo": "default", 580 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 581 + "type": "github" 582 + }, 583 + "original": { 584 + "owner": "nix-systems", 585 + "repo": "default", 586 + "type": "github" 587 + } 588 + }, 589 + "systems_2": { 590 + "locked": { 591 + "lastModified": 1689347949, 592 + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", 593 + "owner": "nix-systems", 594 + "repo": "default-linux", 595 + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", 596 + "type": "github" 597 + }, 598 + "original": { 599 + "owner": "nix-systems", 600 + "repo": "default-linux", 601 + "type": "github" 602 + } 603 + }, 604 + "systems_3": { 605 + "locked": { 606 + "lastModified": 1681028828, 607 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 608 + "owner": "nix-systems", 609 + "repo": "default", 610 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 611 + "type": "github" 612 + }, 613 + "original": { 614 + "owner": "nix-systems", 615 + "repo": "default", 616 + "type": "github" 617 + } 618 + }, 619 + "tinted-foot": { 620 + "flake": false, 621 + "locked": { 622 + "lastModified": 1726913040, 623 + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", 624 + "owner": "tinted-theming", 625 + "repo": "tinted-foot", 626 + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", 627 + "type": "github" 628 + }, 629 + "original": { 630 + "owner": "tinted-theming", 631 + "repo": "tinted-foot", 632 + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", 633 + "type": "github" 634 + } 635 + }, 636 + "tinted-kitty": { 637 + "flake": false, 638 + "locked": { 639 + "lastModified": 1735730497, 640 + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", 641 + "owner": "tinted-theming", 642 + "repo": "tinted-kitty", 643 + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", 644 + "type": "github" 645 + }, 646 + "original": { 647 + "owner": "tinted-theming", 648 + "repo": "tinted-kitty", 649 + "type": "github" 650 + } 651 + }, 652 + "tinted-schemes": { 653 + "flake": false, 654 + "locked": { 655 + "lastModified": 1767710407, 656 + "narHash": "sha256-+W1EB79Jl0/gm4JqmO0Nuc5C7hRdp4vfsV/VdzI+des=", 657 + "owner": "tinted-theming", 658 + "repo": "schemes", 659 + "rev": "2800e2b8ac90f678d7e4acebe4fa253f602e05b2", 660 + "type": "github" 661 + }, 662 + "original": { 663 + "owner": "tinted-theming", 664 + "repo": "schemes", 665 + "type": "github" 666 + } 667 + }, 668 + "tinted-tmux": { 669 + "flake": false, 670 + "locked": { 671 + "lastModified": 1767489635, 672 + "narHash": "sha256-e6nnFnWXKBCJjCv4QG4bbcouJ6y3yeT70V9MofL32lU=", 673 + "owner": "tinted-theming", 674 + "repo": "tinted-tmux", 675 + "rev": "3c32729ccae99be44fe8a125d20be06f8d7d8184", 676 + "type": "github" 677 + }, 678 + "original": { 679 + "owner": "tinted-theming", 680 + "repo": "tinted-tmux", 681 + "type": "github" 682 + } 683 + }, 684 + "tinted-zed": { 685 + "flake": false, 686 + "locked": { 687 + "lastModified": 1767488740, 688 + "narHash": "sha256-wVOj0qyil8m+ouSsVZcNjl5ZR+1GdOOAooAatQXHbuU=", 689 + "owner": "tinted-theming", 690 + "repo": "base16-zed", 691 + "rev": "11abb0b282ad3786a2aae088d3a01c60916f2e40", 692 + "type": "github" 693 + }, 694 + "original": { 695 + "owner": "tinted-theming", 696 + "repo": "base16-zed", 697 + "type": "github" 698 + } 699 + }, 700 + "treefmt-nix": { 701 + "inputs": { 702 + "nixpkgs": "nixpkgs_5" 703 + }, 704 + "locked": { 705 + "lastModified": 1772660329, 706 + "narHash": "sha256-IjU1FxYqm+VDe5qIOxoW+pISBlGvVApRjiw/Y/ttJzY=", 707 + "owner": "numtide", 708 + "repo": "treefmt-nix", 709 + "rev": "3710e0e1218041bbad640352a0440114b1e10428", 710 + "type": "github" 711 + }, 712 + "original": { 713 + "owner": "numtide", 714 + "repo": "treefmt-nix", 715 + "type": "github" 716 + } 717 + }, 718 + "xwayland-satellite-stable": { 719 + "flake": false, 720 + "locked": { 721 + "lastModified": 1755491097, 722 + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", 723 + "owner": "Supreeeme", 724 + "repo": "xwayland-satellite", 725 + "rev": "388d291e82ffbc73be18169d39470f340707edaa", 726 + "type": "github" 727 + }, 728 + "original": { 729 + "owner": "Supreeeme", 730 + "ref": "v0.7", 731 + "repo": "xwayland-satellite", 732 + "type": "github" 733 + } 734 + }, 735 + "xwayland-satellite-unstable": { 736 + "flake": false, 737 + "locked": { 738 + "lastModified": 1772429643, 739 + "narHash": "sha256-M+bAeCCcjBnVk6w/4dIVvXvpJwOKnXjwi/lDbaN6Yws=", 740 + "owner": "Supreeeme", 741 + "repo": "xwayland-satellite", 742 + "rev": "10f985b84cdbcc3bbf35b3e7e43d1b2a84fa9ce2", 743 + "type": "github" 744 + }, 745 + "original": { 746 + "owner": "Supreeeme", 747 + "repo": "xwayland-satellite", 748 + "type": "github" 60 749 } 61 750 } 62 751 },
+95 -19
flake.nix
··· 2 2 inputs = { 3 3 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 4 4 nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11"; 5 - home-manager = { 5 + nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; 6 + niri.url = "github:sodiboo/niri-flake"; 7 + nix-monitored.url = "github:ners/nix-monitored"; 8 + home = { 6 9 url = "github:nix-community/home-manager"; 7 10 inputs.nixpkgs.follows = "nixpkgs"; 8 11 }; 12 + stylix = { 13 + url = "github:danth/stylix"; 14 + inputs.nixpkgs.follows = "nixpkgs"; 15 + }; 16 + rust-overlay = { 17 + url = "github:oxalica/rust-overlay"; 18 + inputs = { 19 + nixpkgs.follows = "nixpkgs"; 20 + }; 21 + }; 22 + noctalia = { 23 + url = "github:noctalia-dev/noctalia-shell"; 24 + inputs.nixpkgs.follows = "nixpkgs"; 25 + inputs.noctalia-qs.follows = "noctalia-qs"; 26 + }; 27 + noctalia-qs = { 28 + url = "github:noctalia-dev/noctalia-qs"; 29 + inputs.nixpkgs.follows = "nixpkgs"; 30 + }; 9 31 }; 10 32 11 - outputs = {self, home-manager, nixpkgs, nixpkgs-stable, ...}: 12 - { 13 - #TODO put home-manager in dtcommon 14 - nixosConfigurations.prospero = nixpkgs.lib.nixosSystem { 15 - system = "x86_64-linux"; 16 - modules = [ 17 - ./all.nix 18 - home-manager.nixosModules.home-manager 19 - ./dt-common.nix 20 - ./prospero/configuration.nix 33 + nixConfig = { 34 + extra-substituters = [ 35 + "https://cache.nixos.org" 36 + "https://cache.lix.systems" 37 + "https://nix-community.cachix.org" 38 + "https://cache.garnix.io" 39 + "https://niri.cachix.org" 40 + ]; 41 + extra-trusted-public-keys = [ 42 + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" 43 + "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" 44 + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" 45 + "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" 46 + "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" 47 + "nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA=" 48 + ]; 49 + }; 50 + 51 + 52 + outputs = {self, home, nixpkgs, nixpkgs-stable, ...}@inputs: 53 + let lib = import ./lib; 54 + config = { 55 + allowUnfree = true; 56 + }; 57 + overlays = [ 58 + inputs.rust-overlay.overlays.default 59 + inputs.niri.overlays.niri 60 + ]; 61 + in { 62 + nixosConfigurations = lib.genNixOSHosts { 63 + inherit inputs config overlays self; 64 + baseModules = [ 65 + home.nixosModules.home-manager 66 + self.nixosModules.default 67 + inputs.niri.nixosModules.niri 68 + inputs.stylix.nixosModules.stylix 69 + inputs.nix-monitored.nixosModules.default 21 70 ]; 22 71 }; 23 - nixosConfigurations.uruk = nixpkgs.lib.nixosSystem { 24 - system = "x86_64-linux"; 25 - modules = [ 26 - ./all.nix 27 - home-manager.nixosModules.home-manager 28 - ./dt-common.nix 29 - ./uruk/configuration.nix 30 - ]; 72 + 73 + homeConfigurations = lib.genHomeHosts { 74 + inherit inputs config overlays; 75 + 76 + user = "joshua"; 77 + 78 + baseModules = [ 79 + self.homeModules.default 80 + inputs.niri.homeModules.niri 81 + inputs.niri.homeModules.stylix 82 + inputs.noctalia.homeModules.default 83 + inputs.stylix.homeModules.stylix 84 + ]; 31 85 }; 86 + 87 + homeModules.default = import ./modules/home; 88 + nixosModules.default = import ./modules/nixos; 89 + #TODO put home-manager in dtcommon 90 + # nixosConfigurations.prospero = nixpkgs.lib.nixosSystem { 91 + # system = "x86_64-linux"; 92 + # modules = [ 93 + # ./all.nix 94 + # home-manager.nixosModules.home-manager 95 + # ./dt-common.nix 96 + # ./prospero/configuration.nix 97 + # ]; 98 + # }; 99 + # nixosConfigurations.uruk = nixpkgs.lib.nixosSystem { 100 + # system = "x86_64-linux"; 101 + # modules = [ 102 + # ./all.nix 103 + # home-manager.nixosModules.home-manager 104 + # ./dt-common.nix 105 + # ./uruk/configuration.nix 106 + # ]; 107 + # }; 32 108 }; 33 109 }
-1
home-manager/#default.nix#
··· 1 - {}
home-manager/default.nix

This is a binary file and will not be displayed.

-99
home-manager/home.nix
··· 1 - { config, pkgs, ... }: 2 - 3 - { 4 - # Home Manager needs a bit of information about you and the paths it should 5 - # manage. 6 - home.username = "joshua"; 7 - home.homeDirectory = "/home/joshua"; 8 - 9 - # This value determines the Home Manager release that your configuration is 10 - # compatible with. This helps avoid breakage when a new Home Manager release 11 - # introduces backwards incompatible changes. 12 - # 13 - # You should not change this value, even if you update Home Manager. If you do 14 - # want to update the value, then make sure to first check the Home Manager 15 - # release notes. 16 - home.stateVersion = "25.05"; # Please read the comment before changing. 17 - 18 - # The home.packages option allows you to install Nix packages into your 19 - # environment. 20 - home.packages = with pkgs; [ 21 - # # Adds the 'hello' command to your environment. It prints a friendly 22 - # # "Hello, world!" when run. 23 - rsync 24 - keepassxc 25 - syncthing 26 - terminus_font 27 - jujutsu 28 - ripgrep 29 - goose-cli 30 - kubectl 31 - k3d 32 - tilt 33 - # # It is sometimes useful to fine-tune packages, for example, by applying 34 - # # overrides. You can do that directly here, just don't forget the 35 - # # parentheses. Maybe you want to install Nerd Fonts with a limited number 36 - # # of fonts? 37 - # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) 38 - 39 - # # You can also create simple shell scripts directly inside your 40 - # # configuration. For example, this adds a command 'my-hello' to your 41 - # # environment: 42 - # (pkgs.writeShellScriptBin "my-hello" '' 43 - # echo "Hello, ${config.home.username}!" 44 - # '') 45 - ]; 46 - 47 - # Home Manager is pretty good at managing dotfiles. The primary way to manage 48 - # plain files is through 'home.file'. 49 - home.file = { 50 - # # Building this configuration will create a copy of 'dotfiles/screenrc' in 51 - # # the Nix store. Activating the configuration will then make '~/.screenrc' a 52 - # # symlink to the Nix store copy. 53 - # ".screenrc".source = dotfiles/screenrc; 54 - 55 - # # You can also set the file content immediately. 56 - # ".gradle/gradle.properties".text = '' 57 - # org.gradle.console=verbose 58 - # org.gradle.daemon.idletimeout=3600000 59 - # ''; 60 - }; 61 - 62 - # Home Manager can also manage your environment variables through 63 - # 'home.sessionVariables'. These will be explicitly sourced when using a 64 - # shell provided by Home Manager. If you don't want to manage your shell 65 - # through Home Manager then you have to manually source 'hm-session-vars.sh' 66 - # located at either 67 - # 68 - # ~/.nix-profile/etc/profile.d/hm-session-vars.sh 69 - # 70 - # or 71 - # 72 - # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh 73 - # 74 - # or 75 - # 76 - # /etc/profiles/per-user/joshua/etc/profile.d/hm-session-vars.sh 77 - # 78 - home.sessionVariables = { 79 - 80 - }; 81 - 82 - # Let Home Manager install and manage itself. 83 - programs.home-manager.enable = true; 84 - programs.zsh.enable = true; 85 - programs.emacs.enable = true; 86 - programs.atuin ={ 87 - enable = true; 88 - flags = [ "--disable-up-arrow" ]; 89 - }; 90 - programs.direnv = { 91 - enable = true; 92 - enableZshIntegration = true; 93 - nix-direnv.enable = true; 94 - }; 95 - services.emacs.enable = true; 96 - services.emacs.defaultEditor = true; 97 - services.emacs.startWithUserSession = "graphical"; 98 - } 99 -
+7
hosts/prospero/default.nix
··· 1 + {...}: { 2 + system = "x86_64-linux"; 3 + modules = [ 4 + ./configuration.nix 5 + ]; 6 + home.modules = ./home.nix; 7 + }
+2
hosts/prospero/home.nix
··· 1 + {...}: 2 + {}
+42
hosts/uruk/configuration.nix
··· 1 + # Edit this configuration file to define what should be installed on 2 + # your system. Help is available in the configuration.nix(5) man page, on 3 + # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). 4 + 5 + { config, lib, pkgs, ... }: 6 + 7 + { 8 + imports = 9 + [ # Include the results of the hardware scan. 10 + ./hardware-configuration.nix 11 + ]; 12 + 13 + # Use the systemd-boot EFI boot loader. 14 + boot.loader.systemd-boot.enable = true; 15 + boot.loader.efi.canTouchEfiVariables = true; 16 + hardware.amdgpu.initrd.enable = true; 17 + hardware.bluetooth.enable = true; 18 + networking.hostId = "5398fbbf"; 19 + system.stateVersion = "25.11"; # Did you read the comment? 20 + 21 + # Disable auto-suspend if gdm is installed. 22 + services.displayManager.gdm.autoSuspend = false; 23 + # Disable the GNOME3/GDM auto-suspend feature that cannot be disabled in GUI! 24 + # If no user is logged in, the machine will power down after 20 minutes. 25 + systemd.targets.sleep.enable = false; 26 + systemd.targets.suspend.enable = false; 27 + systemd.targets.hibernate.enable = false; 28 + systemd.targets.hybrid-sleep.enable = false; 29 + 30 + profiles = { 31 + desktop = { 32 + enable = true; 33 + niri.enable = true; 34 + }; 35 + perftools.enable = true; 36 + games.enable = true; 37 + docs.enable = true; 38 + zfs.enable = true; 39 + # nix-ld.enable = true; 40 + }; 41 + } 42 +
+9
hosts/uruk/default.nix
··· 1 + {...}: { 2 + system = "x86_64-linux"; 3 + modules = [ 4 + ./configuration.nix 5 + ]; 6 + home.modules = [ 7 + ./home.nix 8 + ]; 9 + }
+28
hosts/uruk/home.nix
··· 1 + {...}: 2 + { 3 + profiles = { 4 + desktop.enable = true; 5 + desktop.niri.enable = true; 6 + }; 7 + programs.niri.settings.outputs = { 8 + "DP-2" = { 9 + scale = 1.0; 10 + mode = { 11 + width = 1920; 12 + height = 1980; 13 + refresh = 119.982; 14 + }; 15 + position.x = 0; 16 + position.y = 0; 17 + }; 18 + "HDMI-A-1" = { 19 + mode = { 20 + width = 1920; 21 + height = 1980; 22 + refresh = 74.91; 23 + }; 24 + position.x = 1920; 25 + position.y = 0; 26 + }; 27 + }; 28 + }
+107
lib/default.nix
··· 1 + # Shamelessly copied from github.com/orual/flake because they basically nailed 2 + # it and I can't be assed to do this myself. 3 + let 4 + inherit (builtins) readDir hasAttr attrNames filter concatMap listToAttrs; 5 + 6 + loadHosts = dir: inputs: 7 + let 8 + loadConf = dir: n: (import "${dir}/${n}" inputs) // { hostname = n; }; 9 + 10 + hosts' = 11 + let contents = readDir dir; 12 + in filter (n: contents."${n}" == "directory") (attrNames contents); 13 + in 14 + concatMap 15 + (n: 16 + let 17 + contents = readDir "${dir}/${n}"; 18 + hasDefault = (hasAttr "default.nix" contents) 19 + && (contents."default.nix" == "regular"); 20 + in 21 + if hasDefault then [ (loadConf dir n) ] else [ ]) 22 + hosts'; 23 + in 24 + { 25 + # Discover NixOS configurations. 26 + # It will find all sub-directories in `directory` and 27 + # include it if it has a default.nix. 28 + genNixOSHosts = 29 + { inputs 30 + , self 31 + , directory ? "${inputs.self}/hosts" 32 + , nixpkgs ? inputs.nixpkgs 33 + , builder ? nixpkgs.lib.nixosSystem 34 + , specialArgs ? { } 35 + , baseModules ? [ ] 36 + , overlays ? [ ] 37 + , config ? { allowUnfree = true; } 38 + }: 39 + let 40 + mkHost = { system, modules, hostname, }: 41 + builder { 42 + inherit system; 43 + 44 + specialArgs = { inherit inputs self; } // specialArgs; 45 + 46 + modules = [ 47 + ({ ... }: { 48 + networking.hostName = hostname; 49 + 50 + nixpkgs = { inherit overlays config; }; 51 + }) 52 + ] ++ baseModules ++ modules; 53 + }; 54 + in 55 + listToAttrs (map 56 + (conf: { 57 + name = conf.hostname; 58 + value = mkHost (removeAttrs conf [ "home" ]); 59 + }) 60 + (loadHosts directory inputs)); 61 + 62 + # Discover home-manager configurations. 63 + # It will find all sub-directories in `directory` and 64 + # include it if it has a default.nix. 65 + genHomeHosts = 66 + { inputs 67 + , user 68 + , directory ? "${inputs.self}/hosts" 69 + , nixpkgs ? inputs.nixpkgs 70 + , home ? inputs.home 71 + , builder ? home.lib.homeManagerConfiguration 72 + , specialArgs ? { } 73 + , baseModules ? [ ] 74 + , overlays ? [ ] 75 + , config ? { allowUnfree = true; } 76 + , 77 + }: 78 + let 79 + homeHosts = concatMap 80 + (h: 81 + if (hasAttr "home" h) then 82 + [ ((removeAttrs h [ "home" "modules" ]) // h.home) ] 83 + else 84 + [ ]) 85 + (loadHosts directory inputs); 86 + 87 + mkHost = { system, modules, hostname, }: 88 + let pkgs = import nixpkgs { inherit system config overlays; }; 89 + in builder { 90 + inherit pkgs; 91 + extraSpecialArgs = { inherit inputs; } // specialArgs; 92 + 93 + modules = [ 94 + ({ lib, ... }: { 95 + home.username = lib.mkDefault user; 96 + home.homeDirectory = lib.mkDefault "/home/${user}"; 97 + }) 98 + ] ++ baseModules ++ modules; 99 + }; 100 + in 101 + listToAttrs (map 102 + (conf: { 103 + name = "${user}@${conf.hostname}"; 104 + value = mkHost conf; 105 + }) 106 + homeHosts); 107 + }
+30
modules/home/default.nix
··· 1 + { pkgs, lib, ...}: 2 + { 3 + home.stateVersion = "25.05"; # Please read the comment before changing. 4 + imports = [ ./profiles ]; 5 + manual.manpages.enable = true; 6 + home = { 7 + packages = with pkgs; [ 8 + rsync 9 + ripgrep 10 + jujutsu 11 + ]; 12 + file = { 13 + 14 + }; 15 + sessionVariables = { 16 + 17 + }; 18 + }; 19 + programs.home-manager.enable = true; 20 + programs.zsh.enable = true; 21 + programs.atuin ={ 22 + enable = true; 23 + flags = [ "--disable-up-arrow" ]; 24 + }; 25 + programs.direnv = { 26 + enable = true; 27 + enableZshIntegration = true; 28 + nix-direnv.enable = true; 29 + }; 30 + }
+3
modules/home/profiles/default.nix
··· 1 + {...}: { 2 + imports = [ ./desktop ]; 3 + }
+61
modules/home/profiles/desktop/default.nix
··· 1 + {config, lib, pkgs, ...}: 2 + let cfg = config.profiles.desktop; 3 + in { 4 + imports = [./niri.nix]; 5 + options.profiles.desktop = with lib; { 6 + enable = mkEnableOption "Profile for desktop machines"; 7 + }; 8 + config = lib.mkIf cfg.enable { 9 + home.packages = with pkgs; [ 10 + terminus_font 11 + keepassxc 12 + syncthing 13 + goose-cli 14 + discord 15 + calibre 16 + libreoffice-fresh 17 + obs-studio 18 + inkscape 19 + krita 20 + gimp 21 + vlc 22 + syncplay 23 + # stuff emacs needs 24 + # TODO bind this to a proper emacs nixenv 25 + gcc 26 + gnumake 27 + bison 28 + flex 29 + autoconf 30 + automake 31 + libtool 32 + enchant 33 + pkg-config 34 + # other junk 35 + kubectl 36 + k3d 37 + tilt 38 + rustup 39 + ]; 40 + programs.firefox.enable = true; 41 + programs.emacs.enable = true; 42 + programs.foot.enable = true; 43 + services.emacs.enable = true; 44 + services.emacs.defaultEditor = true; 45 + services.emacs.startWithUserSession = "graphical"; 46 + stylix.base16Scheme = 47 + "${pkgs.base16-schemes}/share/themes/selenized-black.yaml"; 48 + stylix.fonts = { 49 + sizes.terminal = 12; 50 + monospace = { 51 + package = pkgs.terminus_font; 52 + name = "Terminus"; 53 + }; 54 + }; 55 + stylix.enable = true; 56 + stylix.polarity = "dark"; 57 + stylix.image = ./iskandar.png; 58 + stylix.targets.foot.enable = true; 59 + stylix.targets.emacs.enable = false; 60 + }; 61 + }
modules/home/profiles/desktop/iskandar.png

This is a binary file and will not be displayed.

+347
modules/home/profiles/desktop/niri.nix
··· 1 + {config, pkgs, lib, ... }: 2 + with lib; 3 + let 4 + cfg = config.profiles.desktop.niri; 5 + colors = config.lib.stylix.colors.withHashtag; 6 + binds = 7 + { 8 + suffixes, 9 + prefixes, 10 + substitutions ? { }, 11 + }: 12 + let 13 + replacer = replaceStrings (attrNames substitutions) (attrValues substitutions); 14 + format = 15 + prefix: suffix: 16 + let 17 + actual-suffix = 18 + if isList suffix.action then 19 + { 20 + action = head suffix.action; 21 + args = tail suffix.action; 22 + } 23 + else 24 + { 25 + inherit (suffix) action; 26 + args = [ ]; 27 + }; 28 + 29 + action = replacer "${prefix.action}-${actual-suffix.action}"; 30 + in 31 + { 32 + name = "${prefix.key}+${suffix.key}"; 33 + value.action.${action} = actual-suffix.args; 34 + }; 35 + pairs = 36 + attrs: fn: 37 + concatMap ( 38 + key: 39 + fn { 40 + inherit key; 41 + action = attrs.${key}; 42 + } 43 + ) (attrNames attrs); 44 + in 45 + listToAttrs 46 + (pairs prefixes 47 + (prefix: pairs suffixes (suffix: [ (format prefix suffix) ]))); 48 + in 49 + with lib; { 50 + options.profiles.desktop.niri = { 51 + enable = mkEnableOption "niri profile"; 52 + }; 53 + config = mkIf cfg.enable { 54 + programs.niri.package = pkgs.niri-unstable; 55 + stylix.targets.niri.enable = true; 56 + gtk = { 57 + enable = true; 58 + iconTheme = { 59 + name = "Adwaita"; # or whatever you want 60 + package = pkgs.adwaita-icon-theme; 61 + }; 62 + }; 63 + programs.fuzzel = { 64 + enable = true; 65 + settings.main = { 66 + terminal = "${pkgs.foot}/bin/foot"; 67 + layer = "overlay"; 68 + #font = "Terminus:size=12"; 69 + }; 70 + }; 71 + home.packages = with pkgs; [ 72 + brightnessctl 73 + ]; 74 + services.cliphist = { 75 + enable = true; 76 + allowImages = true; 77 + }; 78 + programs.niri.settings = { 79 + prefer-no-csd = true; 80 + layout = { 81 + gaps = 10; 82 + preset-column-widths = [ 83 + { proportion = 1.0 / 4.0; } 84 + { proportion = 1.0 / 3.0; } 85 + { proportion = 1.0 / 2.5; } 86 + { proportion = 1.0 / 2.0; } 87 + { proportion = 2.0 / 3.0; } 88 + { proportion = 3.0 / 4.0; } 89 + { proportion = 5.0 / 6.0; } 90 + ]; 91 + preset-window-heights = [ 92 + { proportion = 1.0 / 3.0; } 93 + { proportion = 0.4; } 94 + { proportion = 0.5; } 95 + { proportion = 2.0 / 3.0; } 96 + ]; 97 + default-column-width = { 98 + proportion = 1.0 / 2.0; 99 + }; 100 + focus-ring = { 101 + width = 2; 102 + active.color = "${colors.base0B}ff"; 103 + }; 104 + }; 105 + spawn-at-startup = [{command = ["keepassxc"];}]; 106 + xwayland-satellite.enable = true; 107 + xwayland-satellite.path = 108 + "${pkgs.xwayland-satellite}/bin/xwayland-satellite"; 109 + screenshot-path = 110 + "~/Pictures/Screenshots/screenshot-%Y-%m-%d-%H:%M:%S.png"; 111 + switch-events = 112 + with config.lib.niri.actions; 113 + let 114 + sh = spawn "sh" "-c"; 115 + in { 116 + lid-close.action = sh "systemctl suspend"; 117 + }; 118 + binds = 119 + with config.lib.niri.actions; 120 + let 121 + sh = spawn "sh" "-c"; 122 + in lib.attrsets.mergeAttrsList [ 123 + { 124 + "Mod+Shift+Slash".action = show-hotkey-overlay; 125 + "Mod+D".action = spawn "fuzzel"; 126 + "Mod+Return".action = spawn "foot"; 127 + "Mod+Shift+S".action.screenshot = [ ]; 128 + "Print".action.screenshot-screen = [ ]; 129 + "Mod+Print".action.screenshot-window = [ ]; 130 + "XF86AudioRaiseVolume".action = 131 + sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+"; 132 + "XF86AudioLowerVolume".action = 133 + sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"; 134 + "XF86AudioMute".action = 135 + sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; 136 + "XF86AudioMicMute".action = 137 + sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; 138 + "Mod+Shift+Q".action = close-window; 139 + "Mod+Space".action = toggle-column-tabbed-display; 140 + "Mod+Tab".action = focus-window-down-or-column-right; 141 + "Mod+Shift+Tab".action = focus-window-up-or-column-left; 142 + "Mod+Shift+Ctrl+F".action = toggle-windowed-fullscreen; 143 + "XF86MonBrightnessUp".action = sh "brightnessctl set 5%+"; 144 + "XF86MonBrightnessDown".action = sh "brightnessctl set 5%-"; 145 + "Mod+V".action = switch-focus-between-floating-and-tiling; 146 + "Mod+Shift+V".action = toggle-window-floating; 147 + "Mod+BracketLeft".action = consume-or-expel-window-left; 148 + "Mod+BracketRight".action = consume-or-expel-window-right; 149 + "Mod+Comma".action = consume-window-into-column; 150 + "Mod+Period".action = expel-window-from-column; 151 + "Mod+R".action = switch-preset-column-width; 152 + "Mod+F".action = maximize-column; 153 + "Mod+Shift+F".action = fullscreen-window; 154 + "Mod+G".action = center-column; 155 + 156 + "Mod+Minus".action = set-column-width "-10%"; 157 + "Mod+Equal".action = set-column-width "+10%"; 158 + "Mod+Shift+Minus".action = set-window-height "-10%"; 159 + "Mod+Shift+Equal".action = set-window-height "+10%"; 160 + 161 + "Mod+Shift+Escape".action = toggle-keyboard-shortcuts-inhibit; 162 + "Mod+Shift+E".action = quit; 163 + "Mod+Shift+P".action = power-off-monitors; 164 + "Mod+Shift+Ctrl+T".action = toggle-debug-tint; 165 + } 166 + (binds { 167 + suffixes."Left" = "column-left"; 168 + suffixes."H" = "column-left"; 169 + suffixes."Down" = "window-down"; 170 + suffixes."J" = "window-down"; 171 + suffixes."Up" = "window-up"; 172 + suffixes."K" = "window-up"; 173 + suffixes."Right" = "column-right"; 174 + suffixes."L" = "column-right"; 175 + prefixes."Mod" = "focus"; 176 + prefixes."Mod+Ctrl" = "move"; 177 + prefixes."Mod+Shift" = "focus-monitor"; 178 + prefixes."Mod+Shift+Ctrl" = "move-window-to-monitor"; 179 + substitutions."monitor-column" = "monitor"; 180 + substitutions."monitor-window" = "monitor"; 181 + }) 182 + (binds { 183 + suffixes."Home" = "first"; 184 + suffixes."End" = "last"; 185 + prefixes."Mod" = "focus-column"; 186 + prefixes."Mod+Ctrl" = "move-column-to"; 187 + }) 188 + (binds { 189 + suffixes."U" = "workspace-down"; 190 + suffixes."I" = "workspace-up"; 191 + prefixes."Mod" = "focus"; 192 + prefixes."Mod+Ctrl" = "move-window-to"; 193 + prefixes."Mod+Shift" = "move"; 194 + }) 195 + (binds { 196 + suffixes = builtins.listToAttrs ( 197 + map (n: { 198 + name = toString n; 199 + value = [ 200 + "workspace" 201 + (n + 1) 202 + ]; # workspace 1 is empty; workspace 2 is the logical first. 203 + }) (range 1 9) 204 + ); 205 + prefixes."Mod" = "focus"; 206 + prefixes."Mod+Ctrl" = "move-window-to"; 207 + }) 208 + ]; 209 + window-rules = [ 210 + { 211 + matches = [ 212 + { 213 + app-id = "^firefox$"; 214 + title = "^Picture-in-Picture$"; 215 + } 216 + ]; 217 + opacity = 1.0; 218 + default-window-height = { 219 + proportion = 0.42; 220 + }; 221 + open-floating = true; 222 + default-column-width = { 223 + proportion = 0.4; 224 + }; 225 + default-floating-position = { 226 + relative-to = "top-left"; 227 + x = 0; 228 + y = 0; 229 + }; 230 + } 231 + { 232 + matches = [ 233 + { 234 + app-id = "^firefox$"; 235 + title = "Private Browsing"; 236 + } 237 + ]; 238 + border.active.color = colors.base0E; 239 + } 240 + { 241 + matches = [ 242 + { 243 + app-id = "^org\\.keepassxc\\.KeePassXC$"; 244 + } 245 + ]; 246 + block-out-from = "screen-capture"; 247 + } 248 + ]; 249 + layer-rules = [ 250 + { 251 + matches = [ { namespace = "notifications"; } ]; 252 + block-out-from = "screen-capture"; 253 + opacity = 0.8; 254 + } 255 + { 256 + matches = [ { namespace = "^noctalia-overview"; } ]; 257 + 258 + place-within-backdrop = true; 259 + } 260 + ]; 261 + }; 262 + # shell configuration w/ noctalia 263 + stylix.targets.noctalia-shell.enable = true; 264 + programs.noctalia-shell = { 265 + enable = true; 266 + systemd.enable = true; 267 + settings = { 268 + bar = { 269 + density = "default"; 270 + position = "top"; 271 + # floating = true; 272 + # showCapsule = true; 273 + # useSeparateOpacity = true; 274 + # capsuleOpacity = lib.mkForce 1; 275 + # backgroundOpacity = lib.mkForce 0.01; 276 + widgets = { 277 + left = [ 278 + { 279 + id = "Launcher"; 280 + } 281 + { 282 + id = "SystemMonitor"; 283 + } 284 + { 285 + id = "MediaMini"; 286 + useFixedWidth = false; 287 + maxWidth = 400; 288 + } 289 + ]; 290 + center = [ 291 + { 292 + formatHorizontal = "ddd yyyy-MM-dd HH:mm"; 293 + formatVertical = "HH mm - MMM dd"; 294 + id = "Clock"; 295 + useMonospacedFont = true; 296 + usePrimaryColor = true; 297 + } 298 + { 299 + hideUnoccupied = false; 300 + id = "Workspace"; 301 + } 302 + { 303 + id = "ActiveWindow"; 304 + useFixedWidth = false; 305 + maxWidth = 400; 306 + } 307 + ]; 308 + right = [ 309 + { 310 + id = "Tray"; 311 + #drawerEnabled = false; 312 + } 313 + { 314 + id = "NotificationHistory"; 315 + } 316 + { 317 + alwaysShowPercentage = true; 318 + id = "Battery"; 319 + warningThreshold = 30; 320 + } 321 + { 322 + id = "Volume"; 323 + } 324 + { 325 + id = "Brightness"; 326 + } 327 + { 328 + id = "ControlCenter"; 329 + useDistroLogo = true; 330 + } 331 + ]; 332 + }; 333 + }; 334 + general = { 335 + }; 336 + location = { 337 + monthBeforeDay = true; 338 + name = "New Haven, CT"; 339 + }; 340 + wallpaper = { 341 + enabled = true; 342 + overviewEnabled = true; 343 + }; 344 + }; 345 + }; 346 + }; 347 + }
+98
modules/nixos/default.nix
··· 1 + {pkgs, lib, config, ...}:{ 2 + imports = [ 3 + ./nix.nix 4 + ./profiles/zfs.nix 5 + ./profiles/networking.nix 6 + ./profiles/perftools.nix 7 + ./profiles/docs.nix 8 + ./profiles/games.nix 9 + ./profiles/desktop 10 + ]; 11 + 12 + console = { 13 + font = "Lat2-Terminus16"; 14 + }; 15 + time.timeZone = "America/New_York"; 16 + 17 + i18n = let 18 + locale = "en_US.UTF-8"; 19 + in { 20 + defaultLocale = locale; 21 + extraLocaleSettings = { 22 + LC_ADDRESS = locale; 23 + LC_IDENTIFICATION = locale; 24 + LC_MEASUREMENT = locale; 25 + LC_MONETARY = locale; 26 + LC_NAME = locale; 27 + LC_NUMERIC = locale; 28 + LC_PAPER = locale; 29 + LC_TELEPHONE = locale; 30 + LC_TIME = locale; 31 + }; 32 + }; 33 + 34 + environment = { 35 + systemPackages = with pkgs; [ 36 + git 37 + nano 38 + # for lspci etc 39 + pciutils 40 + # for lsusb etc 41 + usbutils 42 + lshw 43 + home-manager 44 + lm_sensors 45 + smartmontools 46 + ]; 47 + pathsToLink = ["/share/zsh"]; 48 + }; 49 + programs = { 50 + mtr.enable = true; 51 + zsh.enable = true; 52 + }; 53 + 54 + profiles = { 55 + networking.enable = lib.mkDefault true; 56 + }; 57 + 58 + users.users.joshua = { 59 + subUidRanges = [ { startUid = 100000; count = 65536; } ]; 60 + subGidRanges = [ { startGid = 100000; count = 65536; } ]; 61 + isNormalUser = true; 62 + description = "Joshua Barrett"; 63 + shell = pkgs.zsh; 64 + extraGroups = [ 65 + "wheel" 66 + "docker" 67 + "podman" 68 + "wireshark" 69 + "dialout" 70 + ]; 71 + openssh.authorizedKeys.keys = [ 72 + # prospero 73 + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM0G+Ri6crg86mYVWWDHUiO+FX0GB0di9QkdNvE8SWF" 74 + # mercury 75 + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG3JS6Mf2PwfjZOAh3Cztmeu1CFzxond254jHAeLQ85O" 76 + # uruk 77 + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN4yxSed86xXJ3wuBwxX7HrAHrHSkFliBg7s4Nx53NFS" 78 + ]; 79 + }; 80 + 81 + # Enable the Docker daemon. 82 + virtualisation.docker = { 83 + enable = true; 84 + # Docker appears to select `devicemapper` by default, which is not cool. 85 + storageDriver = if config.profiles.zfs.enable then "zfs" else "overlay2"; 86 + # Prune the docker registry weekly. 87 + autoPrune.enable = true; 88 + extraOptions = '' 89 + --experimental 90 + ''; 91 + }; 92 + 93 + virtualisation.oci-containers = { 94 + backend = "docker"; 95 + }; 96 + 97 + security.pam.sshAgentAuth.enable = lib.mkDefault true; 98 + }
+101
modules/nixos/nix.nix
··· 1 + { config, pkgs, lib, ... }: 2 + with lib; { 3 + options.profiles.nix-ld = { 4 + enable = mkEnableOption "nix-ld profile"; 5 + }; 6 + config = mkMerge [ 7 + { 8 + nixpkgs.config.allowUnfree = true; 9 + nixpkgs.overlays = [ 10 + (self: super: { 11 + nixos-rebuild = super.nixos-rebuild.override { 12 + nix = super.nix-monitored; 13 + }; 14 + nix-direnv = super.nix-direnv.override { 15 + nix = super.nix-monitored; 16 + }; 17 + }) 18 + ]; 19 + 20 + nix = { 21 + package = pkgs.nix-monitored; 22 + gc = { 23 + automatic = true; 24 + dates = "monthly"; 25 + }; 26 + settings = let 27 + substituters = [ 28 + "https://nix-community.cachix.org" 29 + ]; 30 + in { 31 + experimental-features = ["nix-command" "flakes"]; 32 + trusted-users = ["root" "joshua"]; 33 + extra-substituters = substituters; 34 + trusted-substituters = substituters; 35 + extra-trusted-public-keys = [ 36 + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" 37 + ]; 38 + }; 39 + }; 40 + } 41 + (mkIf config.profiles.nix-ld.enable { 42 + # Enable nix ld 43 + programs.nix-ld = { 44 + enable = true; 45 + libraries = with pkgs; [ 46 + alsa-lib 47 + at-spi2-atk 48 + at-spi2-core 49 + atk 50 + cairo 51 + cups 52 + curl 53 + dbus 54 + expat 55 + fontconfig 56 + freetype 57 + fuse3 58 + gdk-pixbuf 59 + glib 60 + gtk3 61 + icu 62 + libGL 63 + libappindicator-gtk3 64 + libdrm 65 + libglvnd 66 + libnotify 67 + libpulseaudio 68 + libunwind 69 + libusb1 70 + libuuid 71 + libxkbcommon 72 + libxml2 73 + mesa 74 + nspr 75 + nss 76 + openssl 77 + pango 78 + pipewire 79 + stdenv.cc.cc 80 + systemd 81 + vulkan-loader 82 + libX11 83 + libXScrnSaver 84 + libXcomposite 85 + libXcursor 86 + libXdamage 87 + libXext 88 + libXfixes 89 + libXi 90 + libXrandr 91 + libXrender 92 + libXtst 93 + libxcb 94 + libxkbfile 95 + libxshmfence 96 + zlib 97 + ]; 98 + }; 99 + }) 100 + ]; 101 + }
+120
modules/nixos/profiles/desktop/default.nix
··· 1 + # Profile for desktop machines (i.e. not servers). 2 + { 3 + config, 4 + lib, 5 + pkgs, 6 + ... 7 + }: let 8 + cfg = config.profiles.desktop; 9 + in { 10 + imports = [ ./niri.nix ]; 11 + 12 + options.profiles.desktop = with lib; { 13 + enable = mkEnableOption "Profile for desktop machines (i.e. not servers)"; 14 + }; 15 + 16 + config = lib.mkIf cfg.enable { 17 + # Use latest kernel by default. 18 + boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; 19 + 20 + ### pipewire ### 21 + # Use PipeWire as the system audio/video bus 22 + services.pulseaudio.enable = false; 23 + security.rtkit.enable = true; 24 + services.pipewire = { 25 + enable = true; 26 + alsa = { 27 + enable = true; 28 + support32Bit = true; 29 + }; 30 + jack.enable = true; 31 + pulse.enable = true; 32 + wireplumber.enable = true; 33 + socketActivation = true; 34 + extraConfig = { 35 + pipewire = { 36 + "10-clock-rate" = { 37 + "context.properties" = { 38 + "default.clock.rate" = 96000; 39 + "default.clock.allowed-rates" = [44100 48000 88200 96000]; 40 + }; 41 + }; 42 + }; 43 + # jack = { 44 + # "20-latency-control" = { 45 + # "jack.properties" = { 46 + # "node.force-quantum" = "64"; 47 + # }; 48 + # }; 49 + # }; 50 + }; 51 + }; 52 + 53 + ### services ### 54 + services = { 55 + # Enable the X11 windowing system. 56 + xserver = with lib; { 57 + enable = mkDefault true; 58 + 59 + # Configure keymap in X11 60 + xkb = { 61 + layout = mkDefault "us"; 62 + variant = mkDefault ""; 63 + options = mkDefault "ctrl:swapcaps,compose:ralt"; 64 + }; 65 + }; 66 + 67 + # Enable CUPS to print documents. 68 + printing.enable = lib.mkDefault true; 69 + }; 70 + console.useXkbConfig = true; 71 + 72 + ### hardware ### 73 + hardware = { 74 + bluetooth.enable = lib.mkDefault true; 75 + }; 76 + 77 + networking.wireless.iwd.enable = lib.mkDefault true; 78 + networking.networkmanager.wifi.backend = lib.mkDefault "iwd"; 79 + 80 + ### programs ### 81 + programs = { 82 + firefox.enable = true; 83 + kdeconnect.enable = true; 84 + }; 85 + 86 + environment.systemPackages = []; 87 + 88 + stylix.base16Scheme = 89 + "${pkgs.base16-schemes}/share/themes/selenized-black.yaml"; 90 + stylix.enable = true; 91 + stylix.polarity = "dark"; 92 + 93 + # stylix.fonts = { 94 + # serif = { 95 + # package = pkgs.ibm-plex; 96 + # name = "IBM Plex"; 97 + # }; 98 + 99 + # sansSerif = { 100 + # package = pkgs.ibm-plex; 101 + # name = "IBM Plex Sans"; 102 + # }; 103 + 104 + # monospace = { 105 + # package = pkgs.nerd-fonts.blex-mono; 106 + # name = "BlexMono Nerd Font"; 107 + # }; 108 + 109 + # emoji = { 110 + # package = pkgs.noto-fonts-color-emoji; 111 + # name = "Noto Color Emoji"; 112 + # }; 113 + # }; 114 + # stylix.cursor = { 115 + # package = pkgs.quintom-cursor-theme; 116 + # name = "Quintom_Snow"; 117 + # size = 24; 118 + # }; 119 + }; 120 + }
+59
modules/nixos/profiles/desktop/niri.nix
··· 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: let 7 + cfg = config.profiles.desktop; 8 + in 9 + with lib; { 10 + options.profiles.desktop.niri = { 11 + enable = mkEnableOption "niri profile"; 12 + }; 13 + 14 + config = mkIf cfg.niri.enable { 15 + profiles.desktop.enable = mkDefault true; 16 + 17 + services = { 18 + displayManager = { 19 + defaultSession = mkForce "niri"; 20 + gdm.enable = mkDefault true; 21 + }; 22 + }; 23 + xdg = { 24 + portal = { 25 + enable = true; 26 + xdgOpenUsePortal = true; 27 + extraPortals = with pkgs; [ 28 + xdg-desktop-portal-gnome 29 + xdg-desktop-portal-gtk 30 + ]; 31 + }; 32 + }; 33 + 34 + environment.systemPackages = with pkgs; [ 35 + libnotify 36 + xwayland-satellite 37 + wl-clipboard 38 + wayland-utils 39 + libsecret 40 + gamescope 41 + ]; 42 + programs = { 43 + firefox = { 44 + #package = mkForce pkgs.firefox-wayland; 45 + nativeMessagingHosts.packages = with pkgs; [ 46 + firefoxpwa 47 + ]; 48 + }; 49 + niri.enable = true; 50 + 51 + niri.package = pkgs.niri-unstable; 52 + }; 53 + environment.variables.NIXOS_OZONE_WL = "1"; 54 + environment.variables.ELECTRON_OZONE_PLATFORM_HINT = "auto"; 55 + 56 + programs.nm-applet.enable = lib.mkForce false; 57 + }; 58 + 59 + }
+49
modules/nixos/profiles/docs.nix
··· 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: let 7 + cfg = config.profiles.docs; 8 + in { 9 + options.profiles.docs = with lib; { 10 + enable = mkEnableOption "documentation profile"; 11 + }; 12 + 13 + config = lib.mkIf cfg.enable { 14 + ### documentation ### 15 + documentation = { 16 + # install documentation from all packages `environment.systemPackages`. 17 + enable = true; 18 + # enable documentation distributed in packages' `/share/doc`. 19 + doc.enable = true; 20 + 21 + man = { 22 + # enable manpages 23 + enable = true; 24 + # generate manpage index caches to enable searching using `man -k`. 25 + cache.enable = true; 26 + }; 27 + 28 + info.enable = true; 29 + 30 + # enable packages' developer documentation 31 + dev.enable = true; 32 + 33 + # install nixos' own documentation 34 + nixos.enable = true; 35 + }; 36 + 37 + environment.systemPackages = with pkgs; [ 38 + # i want all the man pages 39 + man-pages 40 + man-pages-posix 41 + # manpage-style rustdoc viewer 42 + # a fast documentation viewer for nix 43 + manix 44 + # Parse formatted man pages and man page source from most flavors of UNIX 45 + # and converts them to HTML, ASCII, TkMan, DocBook, and other formats 46 + rman 47 + ]; 48 + }; 49 + }
+40
modules/nixos/profiles/games.nix
··· 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: let 7 + cfg = config.profiles.games; 8 + in { 9 + options.profiles.games = with lib; { 10 + enable = mkEnableOption "games profile"; 11 + }; 12 + 13 + config = lib.mkIf cfg.enable { 14 + # some steam games need 32-bit driver support 15 + services.pulseaudio.support32Bit = true; 16 + hardware = { 17 + graphics = { 18 + extraPackages32 = with pkgs.pkgsi686Linux; [libva]; 19 + enable32Bit = true; 20 + }; 21 + }; 22 + 23 + # Steam controller 24 + hardware.steam-hardware.enable = true; 25 + # Steam 26 + programs.steam = { 27 + enable = true; 28 + remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play 29 + dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server 30 + extraPackages = with pkgs; [ 31 + mangohud 32 + gamescope 33 + xwayland-run 34 + ]; 35 + extraCompatPackages = with pkgs; [ 36 + proton-ge-bin 37 + ]; 38 + }; 39 + }; 40 + }
+113
modules/nixos/profiles/networking.nix
··· 1 + { 2 + config, 3 + lib, 4 + pkgs, 5 + ... 6 + }: 7 + with lib; let 8 + cfg = config.profiles.networking; 9 + in 10 + with lib; { 11 + options.profiles.networking = { 12 + enable = mkEnableOption "Network profile"; 13 + }; 14 + 15 + config = mkIf cfg.enable { 16 + #### Networking Configuration #### 17 + 18 + networking = { 19 + # use networkmanager. 20 + networkmanager.enable = lib.mkDefault true; 21 + # disable wpa_supplicant, as NetworkManager is used instead. 22 + wireless.enable = lib.mkForce false; 23 + # `dhcpcd` conflicts with NetworkManager's `dhclient`, as they try to bind 24 + # the same address; it needs to be explicitly disabled. 25 + dhcpcd.enable = false; 26 + 27 + firewall = { 28 + enable = true; 29 + # allows use as a tailscale exit node 30 + checkReversePath = "loose"; 31 + trustedInterfaces = [ "docker0" "tailscale0" ]; 32 + allowedUDPPorts = [ config.services.tailscale.port ]; 33 + }; 34 + # enable mdns resolution for resolved on all connections 35 + # see https://man.archlinux.org/man/NetworkManager.conf.5 36 + networkmanager.connectionConfig."connection.mdns" = 2; 37 + }; 38 + 39 + systemd.services.tailscaled.serviceConfig.Environment = [ 40 + "TS_DEBUG_FIREWALL_MODE=nftables" 41 + ]; 42 + # tailscale gets kinda painful without this. 43 + systemd.network.wait-online.enable = false; 44 + boot.initrd.systemd.network.wait-online.enable = false; 45 + 46 + programs.mosh.enable = mkDefault true; 47 + 48 + services = { 49 + # Enable the OpenSSH daemon. 50 + openssh = { 51 + enable = true; 52 + settings = {X11Forwarding = true;}; 53 + }; 54 + # rkvm = { 55 + # enable = true; 56 + # # client = { 57 + # # enable = true; 58 + # # settings = { 59 + # # password = "test"; 60 + # # certificate = "/etc/secrets/rkvm-certificate.pem"; 61 + # # server = "10.1.2.28:5258"; 62 + # # }; 63 + # # }; 64 + # server = { 65 + # enable = true; 66 + # settings.password = "test"; 67 + # settings.certificate = "/etc/secrets/rkvm-certificate.pem"; 68 + # settings.key = "/etc/secrets/rkvm-key.pem"; 69 + # }; 70 + # }; 71 + 72 + # DNS configurations --- Avahi (mDNS) 73 + avahi = { 74 + enable = true; 75 + # allow local applications to resolve `local.` domains using avahi. 76 + # nssmdns4 = true; 77 + ipv4 = true; 78 + # ipv6 = true; 79 + # publish this machine on mDNS. 80 + publish = { 81 + enable = true; 82 + addresses = true; 83 + # publish ._workstation._tcp 84 + workstation = true; 85 + domain = true; 86 + # publish user services running on this machine 87 + userServices = true; 88 + # publish a HINFO record, which contains information about the local 89 + # operating system and CPU. 90 + hinfo = true; 91 + }; 92 + }; 93 + 94 + # enable tailscale 95 + tailscale.enable = true; 96 + 97 + resolved.enable = true; 98 + }; 99 + 100 + environment.systemPackages = with pkgs; [ 101 + networkmanager 102 + networkmanagerapplet 103 + openssh 104 + kdePackages.bluedevil 105 + bluez 106 + tailscale 107 + ethtool 108 + dig 109 + ]; 110 + 111 + users.users.joshua.extraGroups = ["networkmanager"]; 112 + }; 113 + }
+27
modules/nixos/profiles/perftools.nix
··· 1 + # Configuration for Linux performance profiling tools (perf, ebpf tracing, 2 + # flamegraphs). 3 + { 4 + config, 5 + lib, 6 + pkgs, 7 + ... 8 + }: 9 + with lib; let 10 + linuxpkgs = config.boot.kernelPackages; 11 + cfg = config.profiles.perftools.enable; 12 + in { 13 + options.profiles.perftools.enable = mkEnableOption "perftools"; 14 + 15 + config = mkIf cfg { 16 + environment.systemPackages = with pkgs; [ 17 + # use the correct version of `perf` for the configured `linuxPackages` 18 + perf 19 + # also include userspace perf-tools and flamegraph scripts 20 + perf-tools 21 + flamegraph 22 + ]; 23 + # this does the same thing as above (using the correct `linuxPackages`) but 24 + # for `bcc`...sad there's no version of this for perf out of the box. 25 + programs.bcc.enable = true; 26 + }; 27 + }
modules/zfs.nix modules/nixos/profiles/zfs.nix
prospero/configuration.nix hosts/prospero/configuration.nix
prospero/hardware-configuration.nix hosts/prospero/hardware-configuration.nix
-26
uruk/configuration.nix
··· 1 - # Edit this configuration file to define what should be installed on 2 - # your system. Help is available in the configuration.nix(5) man page, on 3 - # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). 4 - 5 - { config, lib, pkgs, ... }: 6 - 7 - { 8 - imports = 9 - [ # Include the results of the hardware scan. 10 - ./hardware-configuration.nix 11 - ../modules/zfs.nix 12 - ]; 13 - 14 - # Use the systemd-boot EFI boot loader. 15 - boot.loader.systemd-boot.enable = true; 16 - boot.loader.efi.canTouchEfiVariables = true; 17 - hardware.amdgpu.initrd.enable = true; 18 - hardware.bluetooth.enable = true; 19 - profiles.zfs.enable = true; 20 - networking.hostId = "5398fbbf"; 21 - networking.hostName = "uruk"; # Define your hostname. 22 - services.openssh.enable = true; 23 - system.stateVersion = "25.11"; # Did you read the comment? 24 - 25 - } 26 -
uruk/hardware-configuration.nix hosts/uruk/hardware-configuration.nix