diff options
| -rw-r--r-- | _sources/generated.json | 28 | ||||
| -rw-r--r-- | _sources/generated.nix | 28 | ||||
| -rw-r--r-- | accounts/gkleen@skadhi/default.nix | 7 | ||||
| -rw-r--r-- | accounts/gkleen@skadhi/shell/quickshell/BatteryWidget.qml | 6 | ||||
| -rw-r--r-- | accounts/gkleen@skadhi/shell/quickshell/Services/WallpaperSelector.qml | 2 | ||||
| -rw-r--r-- | accounts/gkleen@skadhi/shell/quickshell/WallpaperBackground.qml | 2 | ||||
| -rw-r--r-- | flake.lock | 125 | ||||
| -rw-r--r-- | flake.nix | 15 | ||||
| -rw-r--r-- | hosts/eostre/default.nix | 108 | ||||
| -rw-r--r-- | hosts/eostre/ruleset.nft | 101 | ||||
| -rw-r--r-- | hosts/skadhi/default.nix | 5 | ||||
| -rw-r--r-- | hosts/vidhar/default.nix | 2 | ||||
| -rw-r--r-- | hosts/vidhar/network/dhcp/default.nix | 102 | ||||
| -rw-r--r-- | system-profiles/core/default.nix | 2 | ||||
| -rw-r--r-- | system-profiles/initrd-ssh/default.nix | 47 | ||||
| -rw-r--r-- | system-profiles/initrd-ssh/host-keys/vidhar-private.yaml | 31 | ||||
| -rw-r--r-- | system-profiles/initrd-ssh/host-keys/vidhar-public.yaml | 4 | ||||
| -rw-r--r-- | system-profiles/initrd-ssh/module.nix | 216 |
18 files changed, 108 insertions, 723 deletions
diff --git a/_sources/generated.json b/_sources/generated.json index 5b9149fb..dc6aa7b3 100644 --- a/_sources/generated.json +++ b/_sources/generated.json | |||
| @@ -111,11 +111,11 @@ | |||
| 111 | "passthru": null, | 111 | "passthru": null, |
| 112 | "pinned": false, | 112 | "pinned": false, |
| 113 | "src": { | 113 | "src": { |
| 114 | "sha256": "sha256-LYDoTs7mZOHI85B7k59YZYGM30o9RSiNnQudF33zJ7c=", | 114 | "sha256": "sha256-GVIzn8cJx5VtbQ9YDZpBe2RhuWdNFwLXb2cyO/Wh2fw=", |
| 115 | "type": "tarball", | 115 | "type": "tarball", |
| 116 | "url": "https://github.com/wofr06/lesspipe/archive/refs/tags/v2.28.tar.gz" | 116 | "url": "https://github.com/wofr06/lesspipe/archive/refs/tags/v2.29.tar.gz" |
| 117 | }, | 117 | }, |
| 118 | "version": "2.28" | 118 | "version": "2.29" |
| 119 | }, | 119 | }, |
| 120 | "mpv-autosave": { | 120 | "mpv-autosave": { |
| 121 | "cargoLock": null, | 121 | "cargoLock": null, |
| @@ -355,7 +355,7 @@ | |||
| 355 | }, | 355 | }, |
| 356 | "quickshell": { | 356 | "quickshell": { |
| 357 | "cargoLock": null, | 357 | "cargoLock": null, |
| 358 | "date": "2026-10-16", | 358 | "date": "2026-10-21", |
| 359 | "extract": null, | 359 | "extract": null, |
| 360 | "name": "quickshell", | 360 | "name": "quickshell", |
| 361 | "passthru": null, | 361 | "passthru": null, |
| @@ -365,13 +365,13 @@ | |||
| 365 | "fetchSubmodules": false, | 365 | "fetchSubmodules": false, |
| 366 | "leaveDotGit": false, | 366 | "leaveDotGit": false, |
| 367 | "name": null, | 367 | "name": null, |
| 368 | "rev": "2b4501a282689792b62e94f3fb30d8f512324fe6", | 368 | "rev": "9b0f339b19057f4731bf3b48293307d7ef241671", |
| 369 | "sha256": "sha256-tq6x6CRG8Qikrjri59tzu9+b2gri8TjnShkGeh8kUgQ=", | 369 | "sha256": "sha256-TiCGqLMpNIy7FERewgfKVluPsLVF96uc6x6xwZnMjdQ=", |
| 370 | "sparseCheckout": [], | 370 | "sparseCheckout": [], |
| 371 | "type": "git", | 371 | "type": "git", |
| 372 | "url": "https://git.outfoxxed.me/quickshell/quickshell.git" | 372 | "url": "https://git.outfoxxed.me/quickshell/quickshell.git" |
| 373 | }, | 373 | }, |
| 374 | "version": "2b4501a282689792b62e94f3fb30d8f512324fe6" | 374 | "version": "9b0f339b19057f4731bf3b48293307d7ef241671" |
| 375 | }, | 375 | }, |
| 376 | "scutiger": { | 376 | "scutiger": { |
| 377 | "cargoLock": null, | 377 | "cargoLock": null, |
| @@ -437,7 +437,7 @@ | |||
| 437 | }, | 437 | }, |
| 438 | "v4l2loopback": { | 438 | "v4l2loopback": { |
| 439 | "cargoLock": null, | 439 | "cargoLock": null, |
| 440 | "date": "2026-08-18", | 440 | "date": "2026-10-29", |
| 441 | "extract": null, | 441 | "extract": null, |
| 442 | "name": "v4l2loopback", | 442 | "name": "v4l2loopback", |
| 443 | "passthru": null, | 443 | "passthru": null, |
| @@ -449,12 +449,12 @@ | |||
| 449 | "name": null, | 449 | "name": null, |
| 450 | "owner": "umlaeute", | 450 | "owner": "umlaeute", |
| 451 | "repo": "v4l2loopback", | 451 | "repo": "v4l2loopback", |
| 452 | "rev": "e27cd86c924112ab1fb5e792a7ea43a37ab2903f", | 452 | "rev": "442d720262e150084e7923068fb3c01acc42a253", |
| 453 | "sha256": "sha256-kCarEHsYxXyZSDVh+z/H7WIJ5EtJ3GT2jH67NuKEfB0=", | 453 | "sha256": "sha256-J8cPcFvCcppC8kO6TeaMkPS/NBR1U5dbCYWYW79W1jM=", |
| 454 | "sparseCheckout": [], | 454 | "sparseCheckout": [], |
| 455 | "type": "github" | 455 | "type": "github" |
| 456 | }, | 456 | }, |
| 457 | "version": "e27cd86c924112ab1fb5e792a7ea43a37ab2903f" | 457 | "version": "442d720262e150084e7923068fb3c01acc42a253" |
| 458 | }, | 458 | }, |
| 459 | "xcompose": { | 459 | "xcompose": { |
| 460 | "cargoLock": null, | 460 | "cargoLock": null, |
| @@ -491,12 +491,12 @@ | |||
| 491 | "name": null, | 491 | "name": null, |
| 492 | "owner": "yt-dlp", | 492 | "owner": "yt-dlp", |
| 493 | "repo": "yt-dlp", | 493 | "repo": "yt-dlp", |
| 494 | "rev": "2026.08.19", | 494 | "rev": "2026.10.26", |
| 495 | "sha256": "sha256-BM5ZeGTmHq+1xH6G/zsuCtjLgYgfRA11ya0zIHK5p4g=", | 495 | "sha256": "sha256-0gX99Q45+1L4eH0YK0942DVTq5Wwscq3Qkj+N/EjHek=", |
| 496 | "sparseCheckout": [], | 496 | "sparseCheckout": [], |
| 497 | "type": "github" | 497 | "type": "github" |
| 498 | }, | 498 | }, |
| 499 | "version": "2026.08.19" | 499 | "version": "2026.10.26" |
| 500 | }, | 500 | }, |
| 501 | "yt-dlp-ejs": { | 501 | "yt-dlp-ejs": { |
| 502 | "cargoLock": null, | 502 | "cargoLock": null, |
diff --git a/_sources/generated.nix b/_sources/generated.nix index 75d24d09..8c33f4af 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix | |||
| @@ -72,10 +72,10 @@ | |||
| 72 | }; | 72 | }; |
| 73 | lesspipe = { | 73 | lesspipe = { |
| 74 | pname = "lesspipe"; | 74 | pname = "lesspipe"; |
| 75 | version = "2.28"; | 75 | version = "2.29"; |
| 76 | src = fetchTarball { | 76 | src = fetchTarball { |
| 77 | url = "https://github.com/wofr06/lesspipe/archive/refs/tags/v2.28.tar.gz"; | 77 | url = "https://github.com/wofr06/lesspipe/archive/refs/tags/v2.29.tar.gz"; |
| 78 | sha256 = "sha256-LYDoTs7mZOHI85B7k59YZYGM30o9RSiNnQudF33zJ7c="; | 78 | sha256 = "sha256-GVIzn8cJx5VtbQ9YDZpBe2RhuWdNFwLXb2cyO/Wh2fw="; |
| 79 | }; | 79 | }; |
| 80 | }; | 80 | }; |
| 81 | mpv-autosave = { | 81 | mpv-autosave = { |
| @@ -223,17 +223,17 @@ | |||
| 223 | }; | 223 | }; |
| 224 | quickshell = { | 224 | quickshell = { |
| 225 | pname = "quickshell"; | 225 | pname = "quickshell"; |
| 226 | version = "2b4501a282689792b62e94f3fb30d8f512324fe6"; | 226 | version = "9b0f339b19057f4731bf3b48293307d7ef241671"; |
| 227 | src = fetchgit { | 227 | src = fetchgit { |
| 228 | url = "https://git.outfoxxed.me/quickshell/quickshell.git"; | 228 | url = "https://git.outfoxxed.me/quickshell/quickshell.git"; |
| 229 | rev = "2b4501a282689792b62e94f3fb30d8f512324fe6"; | 229 | rev = "9b0f339b19057f4731bf3b48293307d7ef241671"; |
| 230 | fetchSubmodules = false; | 230 | fetchSubmodules = false; |
| 231 | deepClone = false; | 231 | deepClone = false; |
| 232 | leaveDotGit = false; | 232 | leaveDotGit = false; |
| 233 | sparseCheckout = [ ]; | 233 | sparseCheckout = [ ]; |
| 234 | sha256 = "sha256-tq6x6CRG8Qikrjri59tzu9+b2gri8TjnShkGeh8kUgQ="; | 234 | sha256 = "sha256-TiCGqLMpNIy7FERewgfKVluPsLVF96uc6x6xwZnMjdQ="; |
| 235 | }; | 235 | }; |
| 236 | date = "2026-10-16"; | 236 | date = "2026-10-21"; |
| 237 | }; | 237 | }; |
| 238 | scutiger = { | 238 | scutiger = { |
| 239 | pname = "scutiger"; | 239 | pname = "scutiger"; |
| @@ -275,15 +275,15 @@ | |||
| 275 | }; | 275 | }; |
| 276 | v4l2loopback = { | 276 | v4l2loopback = { |
| 277 | pname = "v4l2loopback"; | 277 | pname = "v4l2loopback"; |
| 278 | version = "e27cd86c924112ab1fb5e792a7ea43a37ab2903f"; | 278 | version = "442d720262e150084e7923068fb3c01acc42a253"; |
| 279 | src = fetchFromGitHub { | 279 | src = fetchFromGitHub { |
| 280 | owner = "umlaeute"; | 280 | owner = "umlaeute"; |
| 281 | repo = "v4l2loopback"; | 281 | repo = "v4l2loopback"; |
| 282 | rev = "e27cd86c924112ab1fb5e792a7ea43a37ab2903f"; | 282 | rev = "442d720262e150084e7923068fb3c01acc42a253"; |
| 283 | fetchSubmodules = true; | 283 | fetchSubmodules = true; |
| 284 | sha256 = "sha256-kCarEHsYxXyZSDVh+z/H7WIJ5EtJ3GT2jH67NuKEfB0="; | 284 | sha256 = "sha256-J8cPcFvCcppC8kO6TeaMkPS/NBR1U5dbCYWYW79W1jM="; |
| 285 | }; | 285 | }; |
| 286 | date = "2026-08-18"; | 286 | date = "2026-10-29"; |
| 287 | }; | 287 | }; |
| 288 | xcompose = { | 288 | xcompose = { |
| 289 | pname = "xcompose"; | 289 | pname = "xcompose"; |
| @@ -299,13 +299,13 @@ | |||
| 299 | }; | 299 | }; |
| 300 | yt-dlp = { | 300 | yt-dlp = { |
| 301 | pname = "yt-dlp"; | 301 | pname = "yt-dlp"; |
| 302 | version = "2026.08.19"; | 302 | version = "2026.10.26"; |
| 303 | src = fetchFromGitHub { | 303 | src = fetchFromGitHub { |
| 304 | owner = "yt-dlp"; | 304 | owner = "yt-dlp"; |
| 305 | repo = "yt-dlp"; | 305 | repo = "yt-dlp"; |
| 306 | rev = "2026.08.19"; | 306 | rev = "2026.10.26"; |
| 307 | fetchSubmodules = false; | 307 | fetchSubmodules = false; |
| 308 | sha256 = "sha256-BM5ZeGTmHq+1xH6G/zsuCtjLgYgfRA11ya0zIHK5p4g="; | 308 | sha256 = "sha256-0gX99Q45+1L4eH0YK0942DVTq5Wwscq3Qkj+N/EjHek="; |
| 309 | }; | 309 | }; |
| 310 | }; | 310 | }; |
| 311 | yt-dlp-ejs = { | 311 | yt-dlp-ejs = { |
diff --git a/accounts/gkleen@skadhi/default.nix b/accounts/gkleen@skadhi/default.nix index 610fa551..a5a49419 100644 --- a/accounts/gkleen@skadhi/default.nix +++ b/accounts/gkleen@skadhi/default.nix | |||
| @@ -78,6 +78,8 @@ in { | |||
| 78 | (lib.removePrefix (config.home.homeDirectory + "/") config.services.unison.pairs."documents".stateDirectory) | 78 | (lib.removePrefix (config.home.homeDirectory + "/") config.services.unison.pairs."documents".stateDirectory) |
| 79 | ".aqbanking" | 79 | ".aqbanking" |
| 80 | ".gnupg" | 80 | ".gnupg" |
| 81 | ".config/remmina" ".local/share/remmina" | ||
| 82 | ".local/share/gnucash" | ||
| 81 | ]; | 83 | ]; |
| 82 | }; | 84 | }; |
| 83 | 85 | ||
| @@ -225,11 +227,6 @@ in { | |||
| 225 | export XDG_DATA_DIRS="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}''${XDG_DATA_DIRS:+:''${XDG_DATA_DIRS}}" | 227 | export XDG_DATA_DIRS="${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}''${XDG_DATA_DIRS:+:''${XDG_DATA_DIRS}}" |
| 226 | ''; | 228 | ''; |
| 227 | 229 | ||
| 228 | xdg.configFile."systemd/user/home-manager.service.d/before-graphical-session.conf".text = '' | ||
| 229 | [Unit] | ||
| 230 | Before=graphical-session-pre.target | ||
| 231 | ''; | ||
| 232 | |||
| 233 | fonts = { | 230 | fonts = { |
| 234 | fontconfig.enable = true; | 231 | fontconfig.enable = true; |
| 235 | }; | 232 | }; |
diff --git a/accounts/gkleen@skadhi/shell/quickshell/BatteryWidget.qml b/accounts/gkleen@skadhi/shell/quickshell/BatteryWidget.qml index b3c9173e..3a5abd24 100644 --- a/accounts/gkleen@skadhi/shell/quickshell/BatteryWidget.qml +++ b/accounts/gkleen@skadhi/shell/quickshell/BatteryWidget.qml | |||
| @@ -46,11 +46,11 @@ Item { | |||
| 46 | if (!root.batteryDevice?.ready) | 46 | if (!root.batteryDevice?.ready) |
| 47 | return "#555"; | 47 | return "#555"; |
| 48 | 48 | ||
| 49 | if (root.batteryDevice.state != UPowerDeviceState.FullyCharged && (root.batteryDevice.state != UPowerDeviceState.PendingCharge || root.batteryDevice.percentage < 0.78) && root.batteryDevice.state != UPowerDeviceState.Charging && root.batteryDevice.timeToEmpty < 20 * 60) | 49 | if (root.batteryDevice.state != UPowerDeviceState.FullyCharged && (root.batteryDevice.state != UPowerDeviceState.PendingCharge || root.batteryDevice.percentage < 0.75) && root.batteryDevice.state != UPowerDeviceState.Charging && root.batteryDevice.timeToEmpty < 20 * 60) |
| 50 | return "#f2201f"; | 50 | return "#f2201f"; |
| 51 | if (root.batteryDevice.state != UPowerDeviceState.FullyCharged && (root.batteryDevice.state != UPowerDeviceState.PendingCharge || root.batteryDevice.percentage < 0.78) && root.batteryDevice.state != UPowerDeviceState.Charging && root.batteryDevice.timeToEmpty < 40 * 60) | 51 | if (root.batteryDevice.state != UPowerDeviceState.FullyCharged && (root.batteryDevice.state != UPowerDeviceState.PendingCharge || root.batteryDevice.percentage < 0.75) && root.batteryDevice.state != UPowerDeviceState.Charging && root.batteryDevice.timeToEmpty < 40 * 60) |
| 52 | return "#f28a21"; | 52 | return "#f28a21"; |
| 53 | if (root.batteryDevice.state != UPowerDeviceState.FullyCharged && (root.batteryDevice.state != UPowerDeviceState.PendingCharge || root.batteryDevice.percentage < 0.78)) | 53 | if (root.batteryDevice.state != UPowerDeviceState.FullyCharged && (root.batteryDevice.state != UPowerDeviceState.PendingCharge || root.batteryDevice.percentage < 0.75)) |
| 54 | return "#fff"; | 54 | return "#fff"; |
| 55 | return "#555"; | 55 | return "#555"; |
| 56 | } | 56 | } |
diff --git a/accounts/gkleen@skadhi/shell/quickshell/Services/WallpaperSelector.qml b/accounts/gkleen@skadhi/shell/quickshell/Services/WallpaperSelector.qml index c71a9cca..2cefdf87 100644 --- a/accounts/gkleen@skadhi/shell/quickshell/Services/WallpaperSelector.qml +++ b/accounts/gkleen@skadhi/shell/quickshell/Services/WallpaperSelector.qml | |||
| @@ -4,5 +4,5 @@ Custom.FileSelector { | |||
| 4 | id: root | 4 | id: root |
| 5 | 5 | ||
| 6 | directory: @wallpapers@ | 6 | directory: @wallpapers@ |
| 7 | epoch: 79200000 | 7 | epoch: 158400000 |
| 8 | } | 8 | } |
diff --git a/accounts/gkleen@skadhi/shell/quickshell/WallpaperBackground.qml b/accounts/gkleen@skadhi/shell/quickshell/WallpaperBackground.qml index 4f85a900..ee1cc8f1 100644 --- a/accounts/gkleen@skadhi/shell/quickshell/WallpaperBackground.qml +++ b/accounts/gkleen@skadhi/shell/quickshell/WallpaperBackground.qml | |||
| @@ -76,7 +76,7 @@ Item { | |||
| 76 | duration: { | 76 | duration: { |
| 77 | if (img === one && two.source == "" || img === two && one.source == "") | 77 | if (img === one && two.source == "" || img === two && one.source == "") |
| 78 | return 0; | 78 | return 0; |
| 79 | return 5000; | 79 | return 15000; |
| 80 | } | 80 | } |
| 81 | easing.type: Easing.OutCubic | 81 | easing.type: Easing.OutCubic |
| 82 | } | 82 | } |
| @@ -502,11 +502,11 @@ | |||
| 502 | ] | 502 | ] |
| 503 | }, | 503 | }, |
| 504 | "locked": { | 504 | "locked": { |
| 505 | "lastModified": 1792495086, | 505 | "lastModified": 1793193205, |
| 506 | "narHash": "sha256-TyoYH983Nsc++1scw0SoOEKshPSJWJDxK7tTmuZ974M=", | 506 | "narHash": "sha256-X6xa6sGA7RnJQuZGbFMC+K+KToWAlBDCCjJXfTwEPsw=", |
| 507 | "owner": "nix-community", | 507 | "owner": "nix-community", |
| 508 | "repo": "home-manager", | 508 | "repo": "home-manager", |
| 509 | "rev": "ec80131710bffcdf3b8498cf41f3a0579833b023", | 509 | "rev": "095fef2f265c3c0da4fe315efba8f8a04495ab34", |
| 510 | "type": "github" | 510 | "type": "github" |
| 511 | }, | 511 | }, |
| 512 | "original": { | 512 | "original": { |
| @@ -516,27 +516,6 @@ | |||
| 516 | "type": "github" | 516 | "type": "github" |
| 517 | } | 517 | } |
| 518 | }, | 518 | }, |
| 519 | "home-manager-eostre": { | ||
| 520 | "inputs": { | ||
| 521 | "nixpkgs": [ | ||
| 522 | "nixpkgs-eostre" | ||
| 523 | ] | ||
| 524 | }, | ||
| 525 | "locked": { | ||
| 526 | "lastModified": 1749562430, | ||
| 527 | "narHash": "sha256-M5MqsIsf+o7yngakVUW4poBGZaghB6sUpw7SsWA55kU=", | ||
| 528 | "owner": "gkleen", | ||
| 529 | "repo": "home-manager", | ||
| 530 | "rev": "dca5a2df9f8a00cc34bea6ead249a8446f5f069e", | ||
| 531 | "type": "github" | ||
| 532 | }, | ||
| 533 | "original": { | ||
| 534 | "owner": "gkleen", | ||
| 535 | "ref": "nixos-late-start-25.05", | ||
| 536 | "repo": "home-manager", | ||
| 537 | "type": "github" | ||
| 538 | } | ||
| 539 | }, | ||
| 540 | "home-manager_2": { | 519 | "home-manager_2": { |
| 541 | "inputs": { | 520 | "inputs": { |
| 542 | "nixpkgs": [ | 521 | "nixpkgs": [ |
| @@ -564,11 +543,11 @@ | |||
| 564 | "nixpkgs": "nixpkgs_2" | 543 | "nixpkgs": "nixpkgs_2" |
| 565 | }, | 544 | }, |
| 566 | "locked": { | 545 | "locked": { |
| 567 | "lastModified": 1792503832, | 546 | "lastModified": 1792739756, |
| 568 | "narHash": "sha256-WsqPR04nPS1bi5bYva04cJJcJyHw7x/rbaJmoXMzF04=", | 547 | "narHash": "sha256-s0TeXWG5Ci75Y/Hzon0Z7NrN/fG773Rc54/z6oPFszQ=", |
| 569 | "owner": "nix-community", | 548 | "owner": "nix-community", |
| 570 | "repo": "impermanence", | 549 | "repo": "impermanence", |
| 571 | "rev": "936ced36ecd25fcbd9b4789184b88aa2e4c2a901", | 550 | "rev": "fa627f4c8b8e92f58f58a73d99ee4e1304e64eb2", |
| 572 | "type": "github" | 551 | "type": "github" |
| 573 | }, | 552 | }, |
| 574 | "original": { | 553 | "original": { |
| @@ -647,11 +626,11 @@ | |||
| 647 | "xwayland-satellite-unstable": "xwayland-satellite-unstable" | 626 | "xwayland-satellite-unstable": "xwayland-satellite-unstable" |
| 648 | }, | 627 | }, |
| 649 | "locked": { | 628 | "locked": { |
| 650 | "lastModified": 1792528076, | 629 | "lastModified": 1793693570, |
| 651 | "narHash": "sha256-nzLrw3rEoDdqBrAfvUmQUhoSuui2jZc71iIQB7d/qoI=", | 630 | "narHash": "sha256-HkkONRW4ziBLRrrG8PwrEPLU9zJWwlypiqoXDUpVdig=", |
| 652 | "owner": "epireyn", | 631 | "owner": "epireyn", |
| 653 | "repo": "niri-flake", | 632 | "repo": "niri-flake", |
| 654 | "rev": "d62f632829c081ad44eb24b4be788fefde2686b2", | 633 | "rev": "7e37a989d1d81a7a0fa8ede4ca6ce7f1da81ff16", |
| 655 | "type": "github" | 634 | "type": "github" |
| 656 | }, | 635 | }, |
| 657 | "original": { | 636 | "original": { |
| @@ -681,11 +660,11 @@ | |||
| 681 | "niri-unstable": { | 660 | "niri-unstable": { |
| 682 | "flake": false, | 661 | "flake": false, |
| 683 | "locked": { | 662 | "locked": { |
| 684 | "lastModified": 1787137621, | 663 | "lastModified": 1793531598, |
| 685 | "narHash": "sha256-Brg8uuW8g2b5sr9HKYjW2P49ZQq7JhQPEJs/zmRUGko=", | 664 | "narHash": "sha256-oDBKgWLot4/Ac9VuRdCMB6vIxRIMCYc8B9kIjp6M+bs=", |
| 686 | "owner": "gkleen", | 665 | "owner": "gkleen", |
| 687 | "repo": "niri", | 666 | "repo": "niri", |
| 688 | "rev": "fd66d564956584a3cca0e1ff7fd57d3b7fddfa70", | 667 | "rev": "42f5ccd7adf0de4416d66a5cd10183f2fb2a3658", |
| 689 | "type": "github" | 668 | "type": "github" |
| 690 | }, | 669 | }, |
| 691 | "original": { | 670 | "original": { |
| @@ -723,11 +702,11 @@ | |||
| 723 | ] | 702 | ] |
| 724 | }, | 703 | }, |
| 725 | "locked": { | 704 | "locked": { |
| 726 | "lastModified": 1792309949, | 705 | "lastModified": 1793543282, |
| 727 | "narHash": "sha256-2DAEMk8YkV8OF6N2uw9jQ016cYoNkcgnq50AShwWxNw=", | 706 | "narHash": "sha256-PHtGxKYM99f8WhGR5YD7iiCiwemKa2wUD4yVI2oALFg=", |
| 728 | "owner": "nix-community", | 707 | "owner": "nix-community", |
| 729 | "repo": "nix-index-database", | 708 | "repo": "nix-index-database", |
| 730 | "rev": "1b4d1758fa6053c5d6284254a793134fa602fbff", | 709 | "rev": "cee0f879d338cf08f814210fa6c2b280594ade0a", |
| 731 | "type": "github" | 710 | "type": "github" |
| 732 | }, | 711 | }, |
| 733 | "original": { | 712 | "original": { |
| @@ -807,11 +786,11 @@ | |||
| 807 | "nixpkgs": "nixpkgs_4" | 786 | "nixpkgs": "nixpkgs_4" |
| 808 | }, | 787 | }, |
| 809 | "locked": { | 788 | "locked": { |
| 810 | "lastModified": 1792491056, | 789 | "lastModified": 1793355509, |
| 811 | "narHash": "sha256-6n1Dn+WYtD8lprnSi+0k4FjbKfIVNG8lblpJ5MiiqXs=", | 790 | "narHash": "sha256-/Zs18x+IW4LuVH0rKxra0WPRgsk0DQsi0Bwkf8sOC5c=", |
| 812 | "owner": "NixOS", | 791 | "owner": "NixOS", |
| 813 | "repo": "nixos-hardware", | 792 | "repo": "nixos-hardware", |
| 814 | "rev": "efb6d0d5e2394c3c5416a18652808aba206c0988", | 793 | "rev": "04c6b94fa104bc23650983a4513aea196794d321", |
| 815 | "type": "github" | 794 | "type": "github" |
| 816 | }, | 795 | }, |
| 817 | "original": { | 796 | "original": { |
| @@ -837,22 +816,6 @@ | |||
| 837 | "type": "github" | 816 | "type": "github" |
| 838 | } | 817 | } |
| 839 | }, | 818 | }, |
| 840 | "nixpkgs-eostre": { | ||
| 841 | "locked": { | ||
| 842 | "lastModified": 1748026580, | ||
| 843 | "narHash": "sha256-rWtXrcIzU5wm/C8F9LWvUfBGu5U5E7cFzPYT1pHIJaQ=", | ||
| 844 | "owner": "NixOS", | ||
| 845 | "repo": "nixpkgs", | ||
| 846 | "rev": "11cb3517b3af6af300dd6c055aeda73c9bf52c48", | ||
| 847 | "type": "github" | ||
| 848 | }, | ||
| 849 | "original": { | ||
| 850 | "owner": "NixOS", | ||
| 851 | "ref": "25.05", | ||
| 852 | "repo": "nixpkgs", | ||
| 853 | "type": "github" | ||
| 854 | } | ||
| 855 | }, | ||
| 856 | "nixpkgs-lib": { | 819 | "nixpkgs-lib": { |
| 857 | "locked": { | 820 | "locked": { |
| 858 | "lastModified": 1722555339, | 821 | "lastModified": 1722555339, |
| @@ -932,11 +895,11 @@ | |||
| 932 | }, | 895 | }, |
| 933 | "nixpkgs-stable_2": { | 896 | "nixpkgs-stable_2": { |
| 934 | "locked": { | 897 | "locked": { |
| 935 | "lastModified": 1792503283, | 898 | "lastModified": 1793633738, |
| 936 | "narHash": "sha256-vhe2jyvRCgufWPqDuDq1S3t3ypE+ka46IFutV02xKso=", | 899 | "narHash": "sha256-tItrb9M8eYA6WhFgmT9tpGKueri3+wRuVA952o/2xSU=", |
| 937 | "owner": "NixOS", | 900 | "owner": "NixOS", |
| 938 | "repo": "nixpkgs", | 901 | "repo": "nixpkgs", |
| 939 | "rev": "cd4ea8d57de16f4810bc5f14207bac45fbf19f67", | 902 | "rev": "7dcdd87373d72e7a2173e4db02e20d3d7f495cfd", |
| 940 | "type": "github" | 903 | "type": "github" |
| 941 | }, | 904 | }, |
| 942 | "original": { | 905 | "original": { |
| @@ -1025,11 +988,11 @@ | |||
| 1025 | }, | 988 | }, |
| 1026 | "nixpkgs_5": { | 989 | "nixpkgs_5": { |
| 1027 | "locked": { | 990 | "locked": { |
| 1028 | "lastModified": 1792502884, | 991 | "lastModified": 1793540411, |
| 1029 | "narHash": "sha256-IoNisKcGbUjdd45qCqywGMCYmZ5EnkxezvLII0FWwNA=", | 992 | "narHash": "sha256-fiPJ88izTVucjeo2EQ3jk4aWmLg03I1D4vxnX2QjEgE=", |
| 1030 | "owner": "NixOS", | 993 | "owner": "NixOS", |
| 1031 | "repo": "nixpkgs", | 994 | "repo": "nixpkgs", |
| 1032 | "rev": "02c087f3fe673c9e317f206a627cb6b910336dbe", | 995 | "rev": "0bb2eedc20e4739f29e8045034f2828ad7054f8f", |
| 1033 | "type": "github" | 996 | "type": "github" |
| 1034 | }, | 997 | }, |
| 1035 | "original": { | 998 | "original": { |
| @@ -1295,11 +1258,11 @@ | |||
| 1295 | ] | 1258 | ] |
| 1296 | }, | 1259 | }, |
| 1297 | "locked": { | 1260 | "locked": { |
| 1298 | "lastModified": 1792499785, | 1261 | "lastModified": 1793585423, |
| 1299 | "narHash": "sha256-mGOkvueuMGSRiD75ccxFzfEvSlIU9ztjFluHMKOtogY=", | 1262 | "narHash": "sha256-Fzdew7s0V4PHsBX0GDQ+1Zcd4HejuqAh9rAjSP9M6JQ=", |
| 1300 | "owner": "pyproject-nix", | 1263 | "owner": "pyproject-nix", |
| 1301 | "repo": "build-system-pkgs", | 1264 | "repo": "build-system-pkgs", |
| 1302 | "rev": "a17819c85163988e063806ffc4f6d2716bc8ead8", | 1265 | "rev": "461a6a8540307fb9c05b8f6ad29e9720d2a621db", |
| 1303 | "type": "github" | 1266 | "type": "github" |
| 1304 | }, | 1267 | }, |
| 1305 | "original": { | 1268 | "original": { |
| @@ -1315,11 +1278,11 @@ | |||
| 1315 | ] | 1278 | ] |
| 1316 | }, | 1279 | }, |
| 1317 | "locked": { | 1280 | "locked": { |
| 1318 | "lastModified": 1791657700, | 1281 | "lastModified": 1793240426, |
| 1319 | "narHash": "sha256-vcCAvhtA7hG+/gOge29hYHy7I/dLkIsr5nLx4sFEQic=", | 1282 | "narHash": "sha256-NPWgb6H4arnWyTKvYIys5U0xqd5QY74Z+lyTJA+7XGY=", |
| 1320 | "owner": "pyproject-nix", | 1283 | "owner": "pyproject-nix", |
| 1321 | "repo": "pyproject.nix", | 1284 | "repo": "pyproject.nix", |
| 1322 | "rev": "ddc400a6883b042646d0940e65971bb7f7e96107", | 1285 | "rev": "bf7d4b1d6de61db02fd4e748395634f03006e5de", |
| 1323 | "type": "github" | 1286 | "type": "github" |
| 1324 | }, | 1287 | }, |
| 1325 | "original": { | 1288 | "original": { |
| @@ -1339,7 +1302,6 @@ | |||
| 1339 | "flake-utils": "flake-utils", | 1302 | "flake-utils": "flake-utils", |
| 1340 | "gitignore": "gitignore_3", | 1303 | "gitignore": "gitignore_3", |
| 1341 | "home-manager": "home-manager", | 1304 | "home-manager": "home-manager", |
| 1342 | "home-manager-eostre": "home-manager-eostre", | ||
| 1343 | "impermanence": "impermanence", | 1305 | "impermanence": "impermanence", |
| 1344 | "lanzaboote": "lanzaboote", | 1306 | "lanzaboote": "lanzaboote", |
| 1345 | "niri-autoselect-portal": "niri-autoselect-portal", | 1307 | "niri-autoselect-portal": "niri-autoselect-portal", |
| @@ -1350,7 +1312,6 @@ | |||
| 1350 | "nixVirt": "nixVirt", | 1312 | "nixVirt": "nixVirt", |
| 1351 | "nixos-hardware": "nixos-hardware", | 1313 | "nixos-hardware": "nixos-hardware", |
| 1352 | "nixpkgs": "nixpkgs_5", | 1314 | "nixpkgs": "nixpkgs_5", |
| 1353 | "nixpkgs-eostre": "nixpkgs-eostre", | ||
| 1354 | "nixpkgs-pgbackrest": "nixpkgs-pgbackrest", | 1315 | "nixpkgs-pgbackrest": "nixpkgs-pgbackrest", |
| 1355 | "nixpkgs-stable": "nixpkgs-stable_3", | 1316 | "nixpkgs-stable": "nixpkgs-stable_3", |
| 1356 | "nvfetcher": "nvfetcher", | 1317 | "nvfetcher": "nvfetcher", |
| @@ -1390,11 +1351,11 @@ | |||
| 1390 | ] | 1351 | ] |
| 1391 | }, | 1352 | }, |
| 1392 | "locked": { | 1353 | "locked": { |
| 1393 | "lastModified": 1792056300, | 1354 | "lastModified": 1793657466, |
| 1394 | "narHash": "sha256-YU1LjDe1o2Ymg5zEiCHbmMXLkDCtxHQRiVqZ3nC5GGk=", | 1355 | "narHash": "sha256-GoOvpdsjO5hqZuO6T6ok9u6sJEjO0iPli2zRr9oNUNw=", |
| 1395 | "owner": "Mic92", | 1356 | "owner": "Mic92", |
| 1396 | "repo": "sops-nix", | 1357 | "repo": "sops-nix", |
| 1397 | "rev": "44931708c62937c2b1bf7953902989fa5bb9ee1b", | 1358 | "rev": "b18e01ce148eb3efff5de2f2d3181ca53b2b2a54", |
| 1398 | "type": "github" | 1359 | "type": "github" |
| 1399 | }, | 1360 | }, |
| 1400 | "original": { | 1361 | "original": { |
| @@ -1465,11 +1426,11 @@ | |||
| 1465 | ] | 1426 | ] |
| 1466 | }, | 1427 | }, |
| 1467 | "locked": { | 1428 | "locked": { |
| 1468 | "lastModified": 1792151315, | 1429 | "lastModified": 1793272761, |
| 1469 | "narHash": "sha256-PMtgvHuGijoIAtPtrBm7kJOI6fxzX4LYPAIK+QVGY+Y=", | 1430 | "narHash": "sha256-3CE1CEwprYlHRlRVkXDkhqec0jjF9Cti7tdk8vVDsCM=", |
| 1470 | "owner": "pyproject-nix", | 1431 | "owner": "pyproject-nix", |
| 1471 | "repo": "uv2nix", | 1432 | "repo": "uv2nix", |
| 1472 | "rev": "7aba73a3d85454f1118f8cf9de97979b4d26bcac", | 1433 | "rev": "c361746c7d630d98b972378290547c8d35542a7a", |
| 1473 | "type": "github" | 1434 | "type": "github" |
| 1474 | }, | 1435 | }, |
| 1475 | "original": { | 1436 | "original": { |
| @@ -1481,16 +1442,16 @@ | |||
| 1481 | "xwayland-satellite-stable": { | 1442 | "xwayland-satellite-stable": { |
| 1482 | "flake": false, | 1443 | "flake": false, |
| 1483 | "locked": { | 1444 | "locked": { |
| 1484 | "lastModified": 1784679892, | 1445 | "lastModified": 1790226849, |
| 1485 | "narHash": "sha256-Mb7jpqnrcYCfNSItIkkHpuR3YxWFxPuIBfcwNKlRBkk=", | 1446 | "narHash": "sha256-eFEjCCniMCKeWU0PcZNv+tDYe08SLFPjRplyPY8OFt4=", |
| 1486 | "owner": "Supreeeme", | 1447 | "owner": "Supreeeme", |
| 1487 | "repo": "xwayland-satellite", | 1448 | "repo": "xwayland-satellite", |
| 1488 | "rev": "8d135d3b2854b30fd01ea6cd6c27e523dd50a839", | 1449 | "rev": "b83eab900644e4c7c77982ce3d44cb490f0c5e1d", |
| 1489 | "type": "github" | 1450 | "type": "github" |
| 1490 | }, | 1451 | }, |
| 1491 | "original": { | 1452 | "original": { |
| 1492 | "owner": "Supreeeme", | 1453 | "owner": "Supreeeme", |
| 1493 | "ref": "v0.8.2", | 1454 | "ref": "v0.8.3", |
| 1494 | "repo": "xwayland-satellite", | 1455 | "repo": "xwayland-satellite", |
| 1495 | "type": "github" | 1456 | "type": "github" |
| 1496 | } | 1457 | } |
| @@ -1498,11 +1459,11 @@ | |||
| 1498 | "xwayland-satellite-unstable": { | 1459 | "xwayland-satellite-unstable": { |
| 1499 | "flake": false, | 1460 | "flake": false, |
| 1500 | "locked": { | 1461 | "locked": { |
| 1501 | "lastModified": 1792070459, | 1462 | "lastModified": 1793192392, |
| 1502 | "narHash": "sha256-qGSyMXPHiXWp9/nE5Zs1DJN5NmZFvoxaBS5Y9i7p0Pc=", | 1463 | "narHash": "sha256-yOM2nAiwSxeeb3X4FYQwLIQtGN9GHgfKyGT6/FqHJ/Q=", |
| 1503 | "owner": "Supreeeme", | 1464 | "owner": "Supreeeme", |
| 1504 | "repo": "xwayland-satellite", | 1465 | "repo": "xwayland-satellite", |
| 1505 | "rev": "97a89cec53eb4f8788386a574450dd94c0538754", | 1466 | "rev": "7bf5e0dcb0d4250860b24b04a6cb3ddeada515d0", |
| 1506 | "type": "github" | 1467 | "type": "github" |
| 1507 | }, | 1468 | }, |
| 1508 | "original": { | 1469 | "original": { |
| @@ -31,12 +31,6 @@ | |||
| 31 | repo = "nixpkgs"; | 31 | repo = "nixpkgs"; |
| 32 | ref = "25.05"; | 32 | ref = "25.05"; |
| 33 | }; | 33 | }; |
| 34 | nixpkgs-eostre = { | ||
| 35 | type = "github"; | ||
| 36 | owner = "NixOS"; | ||
| 37 | repo = "nixpkgs"; | ||
| 38 | ref = "25.05"; | ||
| 39 | }; | ||
| 40 | home-manager = { | 34 | home-manager = { |
| 41 | type = "github"; | 35 | type = "github"; |
| 42 | owner = "nix-community"; | 36 | owner = "nix-community"; |
| @@ -46,15 +40,6 @@ | |||
| 46 | nixpkgs.follows = "nixpkgs"; | 40 | nixpkgs.follows = "nixpkgs"; |
| 47 | }; | 41 | }; |
| 48 | }; | 42 | }; |
| 49 | home-manager-eostre = { | ||
| 50 | type = "github"; | ||
| 51 | owner = "gkleen"; | ||
| 52 | repo = "home-manager"; | ||
| 53 | ref = "nixos-late-start-25.05"; | ||
| 54 | inputs = { | ||
| 55 | nixpkgs.follows = "nixpkgs-eostre"; | ||
| 56 | }; | ||
| 57 | }; | ||
| 58 | sops-nix = { | 43 | sops-nix = { |
| 59 | type = "github"; | 44 | type = "github"; |
| 60 | owner = "Mic92"; | 45 | owner = "Mic92"; |
diff --git a/hosts/eostre/default.nix b/hosts/eostre/default.nix deleted file mode 100644 index f8b48665..00000000 --- a/hosts/eostre/default.nix +++ /dev/null | |||
| @@ -1,108 +0,0 @@ | |||
| 1 | { flake, config, pkgs, lib, ... }: | ||
| 2 | |||
| 3 | with lib; | ||
| 4 | |||
| 5 | { | ||
| 6 | imports = with flake.nixosModules.systemProfiles; [ | ||
| 7 | default-locale nfsroot openssh | ||
| 8 | ]; | ||
| 9 | |||
| 10 | config = { | ||
| 11 | nixpkgs = { | ||
| 12 | system = "x86_64-linux"; | ||
| 13 | externalConfig = { | ||
| 14 | allowUnfree = true; | ||
| 15 | }; | ||
| 16 | extraOverlays = [ | ||
| 17 | (final: prev: { | ||
| 18 | upower = prev.upower.overrideAttrs (oldAttrs: { | ||
| 19 | doCheck = false; | ||
| 20 | }); | ||
| 21 | }) | ||
| 22 | ]; | ||
| 23 | }; | ||
| 24 | |||
| 25 | boot = { | ||
| 26 | initrd = { | ||
| 27 | availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "sd_mod" "sr_mod" ]; | ||
| 28 | kernelModules = [ "igb" ]; | ||
| 29 | }; | ||
| 30 | kernelModules = [ "kvm-amd" ]; | ||
| 31 | extraModulePackages = [ ]; | ||
| 32 | |||
| 33 | plymouth.enable = true; | ||
| 34 | |||
| 35 | tmp.useTmpfs = true; | ||
| 36 | }; | ||
| 37 | |||
| 38 | hardware = { | ||
| 39 | enableRedistributableFirmware = true; | ||
| 40 | cpu.amd.updateMicrocode = config.hardware.enableRedistributableFirmware; | ||
| 41 | |||
| 42 | nvidia = { | ||
| 43 | modesetting.enable = true; | ||
| 44 | powerManagement.enable = true; | ||
| 45 | }; | ||
| 46 | |||
| 47 | graphics.enable = true; | ||
| 48 | }; | ||
| 49 | |||
| 50 | networking = { | ||
| 51 | domain = "lan.yggdrasil"; | ||
| 52 | search = [ "lan.yggdrasil" "yggdrasil" ]; | ||
| 53 | |||
| 54 | hosts = { | ||
| 55 | "127.0.0.1" = [ "eostre.lan.yggdrasil" "eostre" ]; | ||
| 56 | "::1" = [ "eostre.lan.yggdrasil" "eostre" ]; | ||
| 57 | }; | ||
| 58 | |||
| 59 | firewall.enable = false; | ||
| 60 | nftables = { | ||
| 61 | enable = true; | ||
| 62 | rulesetFile = ./ruleset.nft; | ||
| 63 | }; | ||
| 64 | }; | ||
| 65 | |||
| 66 | services.resolved = { | ||
| 67 | llmnr = "false"; | ||
| 68 | }; | ||
| 69 | |||
| 70 | zramSwap.enable = true; | ||
| 71 | |||
| 72 | system.stateVersion = "22.11"; | ||
| 73 | |||
| 74 | |||
| 75 | console.keyMap = "us"; | ||
| 76 | time.hardwareClockInLocalTime = true; | ||
| 77 | |||
| 78 | |||
| 79 | environment.systemPackages = with pkgs; [ cifs-utils ]; | ||
| 80 | |||
| 81 | security.pam.mount = { | ||
| 82 | enable = true; | ||
| 83 | extraVolumes = [ | ||
| 84 | "<volume sgrp=\"users\" fstype=\"cifs\" server=\"vidhar.lan.yggdrasil\" path=\"home-eostre\" mountpoint=\"~\" options=\"mfsymlinks\" />" | ||
| 85 | "<volume sgrp=\"users\" fstype=\"cifs\" server=\"vidhar.lan.yggdrasil\" path=\"%(USER)\" mountpoint=\"/run/media/%(USER)/vidhar\" options=\"mfsymlinks,noexec,nosuid\" />" | ||
| 86 | ]; | ||
| 87 | }; | ||
| 88 | |||
| 89 | services.displayManager.sddm = { | ||
| 90 | enable = true; | ||
| 91 | wayland.enable = true; | ||
| 92 | settings = { | ||
| 93 | Users.HideUsers = "gkleen"; | ||
| 94 | }; | ||
| 95 | }; | ||
| 96 | services.desktopManager.plasma6.enable = true; | ||
| 97 | |||
| 98 | |||
| 99 | services.openssh = { | ||
| 100 | enable = true; | ||
| 101 | startWhenNeeded = true; | ||
| 102 | settings = { | ||
| 103 | PasswordAuthentication = true; | ||
| 104 | KbdInteractiveAuthentication = true; | ||
| 105 | }; | ||
| 106 | }; | ||
| 107 | }; | ||
| 108 | } | ||
diff --git a/hosts/eostre/ruleset.nft b/hosts/eostre/ruleset.nft deleted file mode 100644 index 7b38a059..00000000 --- a/hosts/eostre/ruleset.nft +++ /dev/null | |||
| @@ -1,101 +0,0 @@ | |||
| 1 | define icmp_protos = {ipv6-icmp, icmp, igmp} | ||
| 2 | |||
| 3 | table arp filter { | ||
| 4 | limit lim_arp { | ||
| 5 | rate over 50 mbytes/second burst 50 mbytes | ||
| 6 | } | ||
| 7 | |||
| 8 | chain input { | ||
| 9 | type filter hook input priority filter | ||
| 10 | policy accept | ||
| 11 | |||
| 12 | limit name lim_arp counter drop | ||
| 13 | |||
| 14 | counter | ||
| 15 | } | ||
| 16 | |||
| 17 | chain output { | ||
| 18 | type filter hook output priority filter | ||
| 19 | policy accept | ||
| 20 | |||
| 21 | limit name lim_arp counter drop | ||
| 22 | |||
| 23 | counter | ||
| 24 | } | ||
| 25 | } | ||
| 26 | |||
| 27 | table inet filter { | ||
| 28 | limit lim_reject { | ||
| 29 | rate over 1000/second burst 1000 packets | ||
| 30 | } | ||
| 31 | |||
| 32 | limit lim_icmp { | ||
| 33 | rate over 50 mbytes/second burst 50 mbytes | ||
| 34 | } | ||
| 35 | |||
| 36 | |||
| 37 | chain forward { | ||
| 38 | type filter hook forward priority filter | ||
| 39 | policy drop | ||
| 40 | |||
| 41 | |||
| 42 | ct state invalid log level debug prefix "drop invalid forward: " counter drop | ||
| 43 | |||
| 44 | |||
| 45 | iifname lo counter accept | ||
| 46 | |||
| 47 | |||
| 48 | limit name lim_reject log level debug prefix "drop forward: " counter drop | ||
| 49 | log level debug prefix "reject forward: " counter | ||
| 50 | meta l4proto tcp ct state new counter reject with tcp reset | ||
| 51 | ct state new counter reject | ||
| 52 | |||
| 53 | |||
| 54 | counter | ||
| 55 | } | ||
| 56 | |||
| 57 | chain input { | ||
| 58 | type filter hook input priority filter | ||
| 59 | policy drop | ||
| 60 | |||
| 61 | |||
| 62 | ct state invalid log level debug prefix "drop invalid input: " counter drop | ||
| 63 | |||
| 64 | |||
| 65 | iifname lo counter accept | ||
| 66 | iif != lo ip daddr 127.0.0.1/8 counter reject | ||
| 67 | iif != lo ip6 daddr ::1/128 counter reject | ||
| 68 | |||
| 69 | meta l4proto $icmp_protos limit name lim_icmp counter drop | ||
| 70 | meta l4proto $icmp_protos counter accept | ||
| 71 | |||
| 72 | tcp dport 22 counter accept | ||
| 73 | udp dport 60000-61000 counter accept | ||
| 74 | |||
| 75 | |||
| 76 | ct state {established, related} counter accept | ||
| 77 | |||
| 78 | |||
| 79 | limit name lim_reject log level debug prefix "drop input: " counter drop | ||
| 80 | log level debug prefix "reject input: " counter | ||
| 81 | meta l4proto tcp ct state new counter reject with tcp reset | ||
| 82 | ct state new counter reject | ||
| 83 | |||
| 84 | |||
| 85 | counter | ||
| 86 | } | ||
| 87 | |||
| 88 | chain output { | ||
| 89 | type filter hook output priority filter | ||
| 90 | policy accept | ||
| 91 | |||
| 92 | |||
| 93 | oifname lo counter accept | ||
| 94 | |||
| 95 | meta l4proto $icmp_protos limit name lim_icmp counter drop | ||
| 96 | meta l4proto $icmp_protos counter accept | ||
| 97 | |||
| 98 | |||
| 99 | counter | ||
| 100 | } | ||
| 101 | } \ No newline at end of file | ||
diff --git a/hosts/skadhi/default.nix b/hosts/skadhi/default.nix index cf25777b..ee65bbbe 100644 --- a/hosts/skadhi/default.nix +++ b/hosts/skadhi/default.nix | |||
| @@ -114,5 +114,10 @@ | |||
| 114 | }; | 114 | }; |
| 115 | restartIfChanged = false; | 115 | restartIfChanged = false; |
| 116 | }; | 116 | }; |
| 117 | nixpkgs.externalConfig = { | ||
| 118 | problems.handlers = { | ||
| 119 | "gtk+".broken = "warn"; # or "ignore" | ||
| 120 | }; | ||
| 121 | }; | ||
| 117 | }; | 122 | }; |
| 118 | } | 123 | } |
diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index e97eb20b..90e08a5a 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix | |||
| @@ -8,7 +8,6 @@ with lib; | |||
| 8 | tmpfs-root zfs | 8 | tmpfs-root zfs |
| 9 | initrd-all-crypto-modules default-locale openssh rebuild-machines | 9 | initrd-all-crypto-modules default-locale openssh rebuild-machines |
| 10 | build-server | 10 | build-server |
| 11 | initrd-ssh | ||
| 12 | ]; | 11 | ]; |
| 13 | 12 | ||
| 14 | config = { | 13 | config = { |
| @@ -35,7 +34,6 @@ with lib; | |||
| 35 | 34 | ||
| 36 | initrd = { | 35 | initrd = { |
| 37 | systemd = { | 36 | systemd = { |
| 38 | enable = true; | ||
| 39 | network = { | 37 | network = { |
| 40 | enable = true; | 38 | enable = true; |
| 41 | networks = { | 39 | networks = { |
diff --git a/hosts/vidhar/network/dhcp/default.nix b/hosts/vidhar/network/dhcp/default.nix index e4c3f16e..2efabd23 100644 --- a/hosts/vidhar/network/dhcp/default.nix +++ b/hosts/vidhar/network/dhcp/default.nix | |||
| @@ -48,12 +48,6 @@ in { | |||
| 48 | }; | 48 | }; |
| 49 | 49 | ||
| 50 | client-classes = [ | 50 | client-classes = [ |
| 51 | # { name = "ipxe-eostre"; | ||
| 52 | # test = "hexstring(pkt4.mac, ':') == '00:d8:61:79:c5:40' and option[77].hex == 'iPXE-yggdrasil'"; | ||
| 53 | # next-server = tftpIp; | ||
| 54 | # boot-file-name = "${nfsrootBaseUrl}/eostre.menu.ipxe"; | ||
| 55 | # only-if-required = true; | ||
| 56 | # } | ||
| 57 | { name = "ipxe-yggdrasil"; | 51 | { name = "ipxe-yggdrasil"; |
| 58 | test = "option[77].hex == 'iPXE-yggdrasil'"; | 52 | test = "option[77].hex == 'iPXE-yggdrasil'"; |
| 59 | next-server = tftpIp; | 53 | next-server = tftpIp; |
| @@ -294,43 +288,46 @@ in { | |||
| 294 | name = "installer-${system}"; | 288 | name = "installer-${system}"; |
| 295 | paths = [ | 289 | paths = [ |
| 296 | (builtins.addErrorContext "while evaluating installer-${system}-nfsroot" (let | 290 | (builtins.addErrorContext "while evaluating installer-${system}-nfsroot" (let |
| 297 | installerBuild' = (flake.nixosConfigurations.${"installer-${system}-nfsroot"}.extendModules { | 291 | # installerBuild' = (flake.nixosConfigurations.${"installer-${system}-nfsroot"}.extendModules { |
| 298 | modules = [ | 292 | # modules = [ |
| 299 | ({ ... }: { | 293 | # ({ ... }: { |
| 300 | config.nfsroot.storeDevice = "${nfsIp}:nix-store"; | 294 | # config.nfsroot.storeDevice = "${nfsIp}:nix-store"; |
| 301 | config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/installer-${system}/registration"; | 295 | # config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/installer-${system}/registration"; |
| 302 | config.system.nixos.label = "installer-${system}"; | 296 | # config.system.nixos.label = "installer-${system}"; |
| 303 | }) | 297 | # }) |
| 304 | ]; | 298 | # ]; |
| 305 | }); | 299 | # }); |
| 306 | installerBuild = installerBuild'.config.system.build; | 300 | # installerBuild = installerBuild'.config.system.build; |
| 301 | |||
| 302 | # install -m 0444 -t $out/installer-${system} \ | ||
| 303 | # ${installerBuild.initialRamdisk}/initrd \ | ||
| 304 | # ${installerBuild.kernel}/bzImage \ | ||
| 305 | # ${installerBuild.netbootIpxeScript}/netboot.ipxe \ | ||
| 306 | # ${pkgs.closureInfo { rootPaths = installerBuild.storeContents; }}/registration | ||
| 307 | |||
| 308 | # item installer ${with installerBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} | ||
| 309 | |||
| 310 | # :installer | ||
| 311 | # chain installer-${system}/netboot.ipxe | ||
| 312 | # goto start | ||
| 313 | |||
| 307 | in builtins.toPath (pkgs.runCommandLocal "installer-${system}" {} '' | 314 | in builtins.toPath (pkgs.runCommandLocal "installer-${system}" {} '' |
| 308 | mkdir -p $out/installer-${system} | 315 | mkdir -p $out/installer-${system} |
| 309 | install -m 0444 -t $out/installer-${system} \ | ||
| 310 | ${installerBuild.initialRamdisk}/initrd \ | ||
| 311 | ${installerBuild.kernel}/bzImage \ | ||
| 312 | ${installerBuild.netbootIpxeScript}/netboot.ipxe \ | ||
| 313 | ${pkgs.closureInfo { rootPaths = installerBuild.storeContents; }}/registration | ||
| 314 | install -m 0444 ${pkgs.writeText "installer-${system}.menu.ipxe" '' | 316 | install -m 0444 ${pkgs.writeText "installer-${system}.menu.ipxe" '' |
| 315 | #!ipxe | 317 | #!ipxe |
| 316 | 318 | ||
| 317 | :start | 319 | :start |
| 318 | menu iPXE boot menu for installer-${system} | 320 | menu iPXE boot menu for installer-${system} |
| 319 | item installer ${with installerBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} | ||
| 320 | item memtest memtest86plus | 321 | item memtest memtest86plus |
| 321 | item netboot netboot.xyz | 322 | item netboot netboot.xyz |
| 322 | item shell iPXE shell | 323 | item shell iPXE shell |
| 323 | choose --timeout 0 --default installer selected || goto shell | 324 | choose --timeout 0 --default netboot selected || goto shell |
| 324 | goto ''${selected} | 325 | goto ''${selected} |
| 325 | 326 | ||
| 326 | :shell | 327 | :shell |
| 327 | shell | 328 | shell |
| 328 | goto start | 329 | goto start |
| 329 | 330 | ||
| 330 | :installer | ||
| 331 | chain installer-${system}/netboot.ipxe | ||
| 332 | goto start | ||
| 333 | |||
| 334 | :netboot | 331 | :netboot |
| 335 | iseq ''${platform} efi && chain --autofree netboot.xyz.efi || chain --autofree netboot.xyz.lkrn | 332 | iseq ''${platform} efi && chain --autofree netboot.xyz.efi || chain --autofree netboot.xyz.lkrn |
| 336 | goto start | 333 | goto start |
| @@ -351,57 +348,6 @@ in { | |||
| 351 | install -m 0444 ${sources.netbootxyz-efi.src} $out/netboot.xyz.efi | 348 | install -m 0444 ${sources.netbootxyz-efi.src} $out/netboot.xyz.efi |
| 352 | install -m 0444 ${sources.netbootxyz-lkrn.src} $out/netboot.xyz.lkrn | 349 | install -m 0444 ${sources.netbootxyz-lkrn.src} $out/netboot.xyz.lkrn |
| 353 | '') | 350 | '') |
| 354 | # (builtins.addErrorContext "while evaluating eostre" (let | ||
| 355 | # eostreBuild' = (flake.nixosConfigurations.eostre.extendModules { | ||
| 356 | # modules = [ | ||
| 357 | # ({ ... }: { | ||
| 358 | # config.nfsroot.storeDevice = "${nfsIp}:nix-store"; | ||
| 359 | # config.nfsroot.registrationUrl = "${nfsrootBaseUrl}/eostre/registration"; | ||
| 360 | # config.system.nixos.label = "eostre"; | ||
| 361 | # }) | ||
| 362 | # ]; | ||
| 363 | # }); | ||
| 364 | # eostreBuild = eostreBuild'.config.system.build; | ||
| 365 | # in builtins.toPath (pkgs.runCommandLocal "eostre" {} '' | ||
| 366 | # mkdir -p $out/eostre | ||
| 367 | # install -m 0444 -t $out/eostre \ | ||
| 368 | # ${eostreBuild.initialRamdisk}/initrd \ | ||
| 369 | # ${eostreBuild.kernel}/bzImage \ | ||
| 370 | # ${eostreBuild.netbootIpxeScript}/netboot.ipxe \ | ||
| 371 | # ${pkgs.closureInfo { rootPaths = eostreBuild.storeContents; }}/registration | ||
| 372 | # install -m 0444 ${pkgs.writeText "eostre.menu.ipxe" '' | ||
| 373 | # #!ipxe | ||
| 374 | |||
| 375 | # set menu-timeout 5000 | ||
| 376 | |||
| 377 | # :start | ||
| 378 | # menu iPXE boot menu for eostre | ||
| 379 | # item eostre ${with eostreBuild'; "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})"} | ||
| 380 | # item memtest memtest86plus | ||
| 381 | # item netboot netboot.xyz | ||
| 382 | # item shell iPXE shell | ||
| 383 | # choose --timeout ''${menu-timeout} --default eostre selected || goto shell | ||
| 384 | # set menu-timeout 0 | ||
| 385 | # goto ''${selected} | ||
| 386 | |||
| 387 | # :shell | ||
| 388 | # set menu-timeout 0 | ||
| 389 | # shell | ||
| 390 | # goto start | ||
| 391 | |||
| 392 | # :eostre | ||
| 393 | # chain eostre/netboot.ipxe | ||
| 394 | # goto start | ||
| 395 | |||
| 396 | # :netboot | ||
| 397 | # iseq ''${platform} efi && chain --autofree netboot.xyz.efi || chain --autofree netboot.xyz.lkrn | ||
| 398 | # goto start | ||
| 399 | |||
| 400 | # :memtest | ||
| 401 | # chain --autofree mt86plus.efi | ||
| 402 | # goto start | ||
| 403 | # ''} $out/eostre.menu.ipxe | ||
| 404 | # ''))) | ||
| 405 | ]; | 351 | ]; |
| 406 | }; | 352 | }; |
| 407 | }; | 353 | }; |
diff --git a/system-profiles/core/default.nix b/system-profiles/core/default.nix index 710b57e0..7b8fdc68 100644 --- a/system-profiles/core/default.nix +++ b/system-profiles/core/default.nix | |||
| @@ -193,7 +193,7 @@ in { | |||
| 193 | systemd.sysusers.enable = lib.mkDefault true; | 193 | systemd.sysusers.enable = lib.mkDefault true; |
| 194 | }) | 194 | }) |
| 195 | ++ (optional (options ? system.etc) { | 195 | ++ (optional (options ? system.etc) { |
| 196 | boot.initrd.systemd.enable = lib.mkDefault true; | 196 | # boot.initrd.systemd.enable = lib.mkDefault true; |
| 197 | system.etc.overlay.enable = lib.mkDefault true; | 197 | system.etc.overlay.enable = lib.mkDefault true; |
| 198 | system.etc.overlay.mutable = lib.mkDefault (!config.systemd.sysusers.enable); | 198 | system.etc.overlay.mutable = lib.mkDefault (!config.systemd.sysusers.enable); |
| 199 | 199 | ||
diff --git a/system-profiles/initrd-ssh/default.nix b/system-profiles/initrd-ssh/default.nix deleted file mode 100644 index ef469343..00000000 --- a/system-profiles/initrd-ssh/default.nix +++ /dev/null | |||
| @@ -1,47 +0,0 @@ | |||
| 1 | { hostName, config, pkgs, lib, ... }: | ||
| 2 | |||
| 3 | with lib; | ||
| 4 | |||
| 5 | { | ||
| 6 | config = { | ||
| 7 | boot.initrd = { | ||
| 8 | network = { | ||
| 9 | enable = true; | ||
| 10 | ssh = { | ||
| 11 | enable = true; | ||
| 12 | hostKeys = [ "/etc/ssh/ssh_host_ed25519_key" "/etc/ssh/ssh_host_rsa_key" ]; | ||
| 13 | authorizedKeys = config.users.users.root.openssh.authorizedKeys.keys ++ map (kF: builtins.readFile kF) config.users.users.root.openssh.authorizedKeys.keyFiles; | ||
| 14 | |||
| 15 | extraConfig = '' | ||
| 16 | ForceCommand cryptsetup-askpass | ||
| 17 | ''; | ||
| 18 | }; | ||
| 19 | }; | ||
| 20 | |||
| 21 | secrets = with config.sops.secrets; { | ||
| 22 | "/etc/ssh/ssh_host_ed25519_key" = mkForce initrd_ssh_host_ed25519_key.path; | ||
| 23 | "/etc/ssh/ssh_host_rsa_key" = mkForce initrd_ssh_host_rsa_key.path; | ||
| 24 | }; | ||
| 25 | |||
| 26 | extraFiles = let | ||
| 27 | mkPubkey = typ: pkgs.runCommand "ssh_host_${typ}_key.pub" { buildInputs = with pkgs; [ yq ]; } '' | ||
| 28 | yq -r '.${typ}' ${./host-keys + "/${hostName}-public.yaml"} > $out | ||
| 29 | ''; | ||
| 30 | in { | ||
| 31 | "/etc/ssh/ssh_host_rsa_key.pub".source = mkPubkey "rsa"; | ||
| 32 | "/etc/ssh/ssh_host_ed25519_key.pub".source = mkPubkey "ed25519"; | ||
| 33 | }; | ||
| 34 | }; | ||
| 35 | |||
| 36 | sops.secrets = { | ||
| 37 | initrd_ssh_host_rsa_key = { | ||
| 38 | key = "rsa"; | ||
| 39 | sopsFile = ./host-keys + "/${hostName}-private.yaml"; | ||
| 40 | }; | ||
| 41 | initrd_ssh_host_ed25519_key = { | ||
| 42 | key = "ed25519"; | ||
| 43 | sopsFile = ./host-keys + "/${hostName}-private.yaml"; | ||
| 44 | }; | ||
| 45 | }; | ||
| 46 | }; | ||
| 47 | } | ||
diff --git a/system-profiles/initrd-ssh/host-keys/vidhar-private.yaml b/system-profiles/initrd-ssh/host-keys/vidhar-private.yaml deleted file mode 100644 index 2254f7b6..00000000 --- a/system-profiles/initrd-ssh/host-keys/vidhar-private.yaml +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 1 | rsa: ENC[AES256_GCM,data:u5NbMQLLIHzcH1oUvGbxNRiK0DUX84tQ/sIaUae370jkTdiRTrwTSOX+TielSgwEyLo7KAOVO0olbEheJjP6tLlOExDZZCO09YBqvZksSkT+0irnpA9K3oIPZVAKMgoGMRvr8I1fWn9ZQGpzFBrEOGN9+f5bJ4y44IHUxepvCalQQb4wFNqZv/tPAH8ku18v4U6Nocqfj4PfECzCaslRBY3tCiZ4ipbnBSaLM5KHDZWHYti88kG67xwupJ/v48wLtKwVQIzTvY+oN4ZnwRGzmqHfuz8EET/BrLZ/WLJtf3JuEqTZQIw24qP/8Q2/zEH40IzxeZvP5D1MzPpEVamU1FM9WAtwOQkrpoZL8+lRpcJvQdqbZqz1qLGU0MZmI++MudxebuIZ5g36y7xLAcYS3OuaekG66e6fhp1txqK09HB3wxXJVq7B13ip0MRDl1xfbVkSfDFBSSZ7hCueFS+2ee8d7fha7Y1wINZ5eU9WCjRG3yD/vMvLbJjRDKVhCZmoWUWcrhlzOIRmgYVetZqsHmPjBqOFd4bdc8fJLoJaGtlUFxSpuep8kO48J5Ibuk2GnBaiWinT92rUrkbErlREnDDt20B6ev7A3uJ8kLogiH6OdwVMvw2U1DTSsUZFhzlgXxe9kSThonR8ISpMOafDQOucfHNf96P5I5px0w6+KjZAFp9E7Liw3I5CBkvx+DYPYrq+4l3Q6/NdEAIBJivfxItLCbQn0EdS5bRPjWlygEjWmcUz2ivmTShpHYO4ZGjrgxgF6SVzJFcS66UzL/MrdHwxWuTkjcOQ8S9CaUq4uSniHusnO5RQEbDQSFvH5+D9R/vsaqDx+Hr1VHj782hEMDaRnV6afV1j4zlrJyO6VoUDVH5NAnlGRxDBDjnPhS+769qVlqlGNcrMqHJC0Xp2LPEfxKdRfPFAxSAVGNCj7s2w2t0/XSZ3qPOHOzkQRx0A4wD9r0CtarE1mO1My2mQnCSs/t9MGNiVNWRJXox4R2cpZY773+4XCPIli89ByOl6nVc1kva/ZifpVdLOAd0nPD+flq+H8CdZDWDcZVPrsiNplP3f38b41mIdpP/H4INORFnmOl1NEpwAO2J9n4uWBkXhst4PYJoTwdkr4YkVOgYK1hYlvrXoo36B/akTmVLNXwA7E75Db5LcMNhtnHuaUMmc1a1ztMQzXAKbeC4GR173kT49Yo8o0rkVTUPYYyXpAQyOIkwL1yRI1QvArKmwzb21UcN4t0dd7VGGTyDe3tJ8rdtJp7g225YSrFCOKKcpPCEKrKaqZMknOTzANnKMzwk/bHeGU9vaAOKrPJ8FjPqO6txWumYIXcMUyLERZ8jaC+1NTbGeq+u8q0IkESOTOB8TGEmafa6UBIkn15L5DDM4aA8sxjXL3WHaDRNfeRUjT5QVW3a3AiNMvEugNQIksTBcIpj7xPcf5LkncopP5BhLKFj3n9wGEdI/BBCclR3VnkIVkiGjxcJpdjkRXIYIxo69a/xV31Sw/sFxbg0/QsdEkCzkn553/SQbWKJbQDnSeQPNc5UIfSsn0wqknIOgRjFbHEZDD+PGPFrQzbz+v54ZfpVtCmgkoYvu4M6sfJ8r0VuuEcHCAjyS2CzFR6IYqyR7dZqDBAwdP6EeDbo2tQFwH0myYEkPFSwwWfPzvayyjP85LSVBNVBpCGVeuNSDYiJ0j/hyOYNxwj+rQ8IC+0Fl0EbikZuVZ8LD/tQl08aCh4g89psayM0PBKUrs0FCJoh6uSXKbSuenyllvjc9KRj0uwKYtKO/QhfCf1XgAdcUm3FRWGAohDrPaWkeCn75YerskIcDaVZuk9sQa76vW4djWzJpGPPZ1lYQh1IMojFr/SbRqvH/q5Jj3GHbRaVvkym1VRFQmerb0g7WPcs1tugTUvXSLm8dnfBYNCX6X/LkfyMtW6LeWlasdOTSOzNh+HpqIDMXRwq7l3xfwCuvIVcdF0aS+uWpOeiBuqPVCNqr1qF0IzGI53Uw5bkFY/wxxwIBbRxi1pAy91C4nLjWnhWgNw66h23Cw/cq2aFNdSsw/Amtn/8TztUIpH6QZG/1QyaZBjH+yXUm4OFkb31VVQCnaEPqHVoHpkmGFu2zNMrrVCHLEwOpyyBpRskHA1oGCv0fv5Smn6G+n2liHe0YDPQdH+GvMvJYfuzju0eahFhozRU1X3NPbbHAKcxffeQ+bkXN2QQncJgmPMY6bzbe85S94uk3Y0lSf4/L9kWcoaV+96ChjZ7hV1nFjkD0R9GPsEmLebS7MdnzDQLRMKhwEJgLi6S7PZg/Q9OPuXU7qX2mnmM9S7HLDfeW1oMcGhrhj/bvneBJB+XG4GWnQUVGS4EKACURV9A2nyx3/zfXIdEW1FX3dByWuJf73hPqnWqrGunMb1tHAWenTnw34KT5l077duSvYGpS44AGyZwwpA/7rwAAYlu2G0m+lPWRvJMSQweoKwgZh58E2v9T0b+yAY+YTpTMnh/gALW7wtpJy77IzroZEKx0ysWQ7HywzbXoZc3wpiCvGbxrxQJsLj91JBo7QT6VwCgId6bLgcgMwX6YptRTqTu7nt37VzeT3jsWj5TvXXXa0sToWplUtE5WzwpSx6sx7iPwd63NSDBSfGoOH6ZFgBBVuu1qSYUekp3oipY86V4w+bpPexck/ZgS8fMfYVILlAvt97J7tRTEqo02opEWwO2a4t1lBjaVtvskUIC5ddcSDN0JwY6JpblS2i9CiDB+Dv4oA8oepA/GGnbIK9YUC4uerrfZjPfyf9lIIKYY3EpvMghhOYLkKR/jwDAX7t6c92YrkCtNXRAiGPNMnYiP5S9kK7zlVeb/70Nd3Ew6iOlpklNRlMM6zSOy8vzRGnBoDhtWcPDmyUHh0W9ZuXv2LD+f7qaMqZngKxo3kdThA2bCMRpCiAst/1GmEq/7cw7R6TW+ENcBZfZqZLUcIHAMFsVJ5M8LpUT0Q4kQ6Ha3uiPDdRtC5gXFEWhTq+XPBm5Sn2EMOxqI+j0yknhGXQ4dpr+AAT6B6y5fYR3Fe3ytTMet5Q1fezTuL4bRPRyHpV+R9QigSf+OM47SwbG4E/+ZKuIMWfBsIv+vfuw5XGTXGHtYm2rvAD92BTa8pMrD9G4o6ZTHTUO9DGnYZUhLdWYFH6I8TS5IGKuwvo5DezUmyoC08BR7yAq2zm33cw9WaNfNCDpBSCUuzrgXJHDEJVICc9QugMM3Z17U0oPksGybj02gptC8724cxxA0Spxb1seRsRlMYHYWCI2Tdv9Mjhr5sw5MjwtioALbQ4hsihXgTGlqkrgaW2TAKFt8L4gb2hhp5l+jxnGF3gacFodniRLGI4ue6MgwlHhFVaiGa5dT+tjU6tYDVCaL8DeHj7UZDEs2NJo4+v5lwv6JjZMAZfbPFY150KSlHV2u0ll64pF7sJjKF7pEaSYYmdRhEjCjFpMCmtJ0rxJtgIyuzA==,iv:r/ksbyC44RrP2BCUUdmOHPfIhi9LPCF+fs1/urWz6Ss=,tag:Zk3xJw1tcf+/YQpAYwVt+w==,type:str] | ||
| 2 | ed25519: ENC[AES256_GCM,data:PE0UKLLThNwkdi2oz38HlgslJD5i9c9cL4ZBSBxSMcz7bXzLMv58Z9vucJ4WPtBxKSvFx5ksl/alRUyh2WTxuGNgut9vcgcNSG2qXzb8jdxb5CbFK1yVglVX7wtQkaOwmlc1Pty64sA0jwucaQQhEMeVXA/kxwe5uagCIupjP6lqnkzAuf4Dc1jIfXdEoEV0jtVUSjgeXHPymSPkg1J95VUMEIfVbncFxvzSQngv5kuE/XoH3adujuKR9fC/Z5u08hSjTzGQzMdgZk5BYvy7AWYN8SmfWcyAkClywj9DCzgaw8KY+MzSxQWrhAt3rqobmtVoJoJ5oc1/l6m5pPsyb/Ex2wwFh/rWm7SNfhW/Ev/ZuIX7llL7HCgXxhiCJIl9X4jkwF6OvslvK1wYgJ6rvGQwyM+/7Q8/rX1KJnq3qA93SfDi/fPLuJxcMYj/mZ/bluG4bsTFaUzDf1l6C251p24JJt3F0o1RTF1zgACrdhKK1BN79sQt4xDnHawCCwEkBbdeE0pmml1i3aUy5thl,iv:6cYTjmJd44Uc+uwnIZI1CUuKhYNGHuWa8wr7CYJY3RY=,tag:+PGy7aVeHyLH+B04Nj8BRQ==,type:str] | ||
| 3 | sops: | ||
| 4 | kms: [] | ||
| 5 | gcp_kms: [] | ||
| 6 | azure_kv: [] | ||
| 7 | hc_vault: [] | ||
| 8 | age: | ||
| 9 | - recipient: age1rmmhetcmllq0ahl5qznlr0eya2zdxwl9h6y5wnl97d2wtyx5t99sm2u866 | ||
| 10 | enc: | | ||
| 11 | -----BEGIN AGE ENCRYPTED FILE----- | ||
| 12 | YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBiem1qTmo4bjhUUDFDM2ds | ||
| 13 | Y3dRc3RJT1YvYkJXblZsbHF4NTRWUGsvWTE4CnRDV1IwSjdVUUttWXVETElQYXRJ | ||
| 14 | SmxvL0dDQ3E5ZEpCMFZ1T3EvU3Y4Vm8KLS0tIFlVMnorMGdCZFJWYkp6bFV6eUVB | ||
| 15 | Vjd5dXd3a1UrSnAyd2xGbXVyVFN1bWcKYm8yCZdvyNn9DzAyGrVt8U25KPk8eXD2 | ||
| 16 | 051EQi99DS0U3BYRI+hhL41cm26nai1USU6Oo2PvxswYmObMDfKrPg== | ||
| 17 | -----END AGE ENCRYPTED FILE----- | ||
| 18 | - recipient: age1qffdqvy9arld9zd5a5cylt0n98xhcns5shxhrhwjq5g4qa844ejselaa4l | ||
| 19 | enc: | | ||
| 20 | -----BEGIN AGE ENCRYPTED FILE----- | ||
| 21 | YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAra0FydFJpbHBXNms0aVUw | ||
| 22 | T3U4OXFJck1Ta0dvMHJ4ckRVaFQvcnhlQ1ZJCmx5UjhZNGNEb0N5NUJ5cFdCc2Nq | ||
| 23 | anRrc1BOb2NHVFY1cG5xMUY0WGx2cDAKLS0tIFQ3aU1hM1BlOWw2RkZPYlp3SkYx | ||
| 24 | d0Fhd0tKVnFkc0dOTXFaaG1OcmY2YVkKb0xFefYhjcjZ+wL9oGoN52hqvLPeXtkT | ||
| 25 | xOinOyzi2Cm+wsZu4BZlTabVoAU8uu810D315Ex7+bFL8f8KROEaOg== | ||
| 26 | -----END AGE ENCRYPTED FILE----- | ||
| 27 | lastmodified: "2021-08-03T14:47:32Z" | ||
| 28 | mac: ENC[AES256_GCM,data:gWbmGMZ+/Ts7NP9J1q/kjQmJ7V6lJ5xFpjZNJ+aTOmkz7a6sG8SRvNEW/qrpJfCzEFdQJYhOW3X9FhWpb5U6j4gINrgqUGdusQpw0PmIieC5tCPQPlTPHMReK0xaZ3NViMdHJhGdtehGfPqAtA3Bifn2ZZzOrzTOaPN2fH11fZw=,iv:FhKERfmDPmWn5ZKkuHWMc/vINpmJTr0jZ1iCkSgAUEs=,tag:ibe+m8vz6b+a+as5mz4+eA==,type:str] | ||
| 29 | pgp: [] | ||
| 30 | unencrypted_suffix: _unencrypted | ||
| 31 | version: 3.7.1 | ||
diff --git a/system-profiles/initrd-ssh/host-keys/vidhar-public.yaml b/system-profiles/initrd-ssh/host-keys/vidhar-public.yaml deleted file mode 100644 index af521564..00000000 --- a/system-profiles/initrd-ssh/host-keys/vidhar-public.yaml +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | rsa: | | ||
| 2 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCs0bzHfJBgG5AP0nSUgkGBoxRLRDu9FMfwJN3NFLeUf1axmKPja0mO+ddUQeLobDcl4zU4VyBxdd5qrrSkAufM76GJJFqXGJs98WudELXD5I4/o99Fh7xSf6QtafftTbjUfcTzX9t30Cb109Ppv1sKANcfLOx5EWH4TX3WK0vWTZHlS/OHvojwx7Y8/8dYbA96neMSBK5ceDu/VAG/JHYz5JgtDczSKUnbh026xav8rv9Sd3paC42XNlWSkjvpXxXoJ+ta5SuOXAl+4gPDvjgxK+QJ+yglhJma7LdHt7tqQjy/R0v5+wMzbNCKdQ1E9GiCw+hSE3mbCj/PVFy+J1oadBta+qF5SKCSurFeCRaehTTz6Qynxu0OxLQV/OHX6yC2i9OVJOs0PNGiot9pjxoSKyKrlT7gshP6MRfC1F330oVDSOPAkFLFFkTJtzb0ifJ5s1LyM0LyJAPso+5ytCcSOoQpcKd54VbSTYXBcnWtRFtEzUDIeLDeRWgQ0zJsef8= | ||
| 3 | ed25519: | | ||
| 4 | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBb+RVaConednm1DsYh18ttUEs/FJ7+E3g0YGbZcJthp | ||
diff --git a/system-profiles/initrd-ssh/module.nix b/system-profiles/initrd-ssh/module.nix deleted file mode 100644 index db973b72..00000000 --- a/system-profiles/initrd-ssh/module.nix +++ /dev/null | |||
| @@ -1,216 +0,0 @@ | |||
| 1 | { flakeInputs, config, lib, pkgs, ... }: | ||
| 2 | |||
| 3 | with lib; | ||
| 4 | |||
| 5 | let | ||
| 6 | |||
| 7 | cfg = config.boot.initrd.network.ssh; | ||
| 8 | |||
| 9 | in | ||
| 10 | |||
| 11 | { | ||
| 12 | disabledModules = [ "system/boot/initrd-ssh.nix" ]; | ||
| 13 | |||
| 14 | options.boot.initrd.network.ssh = { | ||
| 15 | enable = mkOption { | ||
| 16 | type = types.bool; | ||
| 17 | default = false; | ||
| 18 | description = '' | ||
| 19 | Start SSH service during initrd boot. It can be used to debug failing | ||
| 20 | boot on a remote server, enter pasphrase for an encrypted partition etc. | ||
| 21 | Service is killed when stage-1 boot is finished. | ||
| 22 | |||
| 23 | The sshd configuration is largely inherited from | ||
| 24 | {option}`services.openssh`. | ||
| 25 | ''; | ||
| 26 | }; | ||
| 27 | |||
| 28 | port = mkOption { | ||
| 29 | type = types.port; | ||
| 30 | default = 22; | ||
| 31 | description = '' | ||
| 32 | Port on which SSH initrd service should listen. | ||
| 33 | ''; | ||
| 34 | }; | ||
| 35 | |||
| 36 | shell = mkOption { | ||
| 37 | type = types.str; | ||
| 38 | default = "/bin/ash"; | ||
| 39 | description = '' | ||
| 40 | Login shell of the remote user. Can be used to limit actions user can do. | ||
| 41 | ''; | ||
| 42 | }; | ||
| 43 | |||
| 44 | hostKeys = mkOption { | ||
| 45 | type = types.listOf (types.either types.str types.path); | ||
| 46 | default = []; | ||
| 47 | example = [ | ||
| 48 | "/etc/secrets/initrd/ssh_host_rsa_key" | ||
| 49 | "/etc/secrets/initrd/ssh_host_ed25519_key" | ||
| 50 | ]; | ||
| 51 | description = '' | ||
| 52 | Specify SSH host keys to import into the initrd. | ||
| 53 | |||
| 54 | To generate keys, use | ||
| 55 | {manpage}`ssh-keygen(1)` | ||
| 56 | as root: | ||
| 57 | |||
| 58 | ``` | ||
| 59 | ssh-keygen -t rsa -N "" -f /etc/secrets/initrd/ssh_host_rsa_key | ||
| 60 | ssh-keygen -t ed25519 -N "" -f /etc/secrets/initrd/ssh_host_ed25519_key | ||
| 61 | ``` | ||
| 62 | |||
| 63 | ::: {.warning} | ||
| 64 | Unless your bootloader supports initrd secrets, these keys | ||
| 65 | are stored insecurely in the global Nix store. Do NOT use | ||
| 66 | your regular SSH host private keys for this purpose or | ||
| 67 | you'll expose them to regular users! | ||
| 68 | |||
| 69 | Additionally, even if your initrd supports secrets, if | ||
| 70 | you're using initrd SSH to unlock an encrypted disk then | ||
| 71 | using your regular host keys exposes the private keys on | ||
| 72 | your unencrypted boot partition. | ||
| 73 | ::: | ||
| 74 | ''; | ||
| 75 | }; | ||
| 76 | |||
| 77 | manageHostKeySecrets = mkEnableOption "automatically managing initrd secrets for configured hostkeys"; | ||
| 78 | |||
| 79 | authorizedKeys = mkOption { | ||
| 80 | type = types.listOf types.str; | ||
| 81 | default = config.users.users.root.openssh.authorizedKeys.keys; | ||
| 82 | defaultText = literalExpression "config.users.users.root.openssh.authorizedKeys.keys"; | ||
| 83 | description = '' | ||
| 84 | Authorized keys for the root user on initrd. | ||
| 85 | ''; | ||
| 86 | }; | ||
| 87 | |||
| 88 | extraConfig = mkOption { | ||
| 89 | type = types.lines; | ||
| 90 | default = ""; | ||
| 91 | description = "Verbatim contents of {file}`sshd_config`."; | ||
| 92 | }; | ||
| 93 | }; | ||
| 94 | |||
| 95 | imports = | ||
| 96 | map (opt: mkRemovedOptionModule ([ "boot" "initrd" "network" "ssh" ] ++ [ opt ]) '' | ||
| 97 | The initrd SSH functionality now uses OpenSSH rather than Dropbear. | ||
| 98 | |||
| 99 | If you want to keep your existing initrd SSH host keys, convert them with | ||
| 100 | $ dropbearconvert dropbear openssh dropbear_host_$type_key ssh_host_$type_key | ||
| 101 | and then set options.boot.initrd.network.ssh.hostKeys. | ||
| 102 | '') [ "hostRSAKey" "hostDSSKey" "hostECDSAKey" ]; | ||
| 103 | |||
| 104 | config = let | ||
| 105 | # Nix complains if you include a store hash in initrd path names, so | ||
| 106 | # as an awful hack we drop the first character of the hash. | ||
| 107 | initrdKeyPath = path: if isString path | ||
| 108 | then path | ||
| 109 | else let name = builtins.baseNameOf path; in | ||
| 110 | builtins.unsafeDiscardStringContext ("/etc/ssh/" + | ||
| 111 | substring 1 (stringLength name) name); | ||
| 112 | |||
| 113 | sshdCfg = config.services.openssh; | ||
| 114 | |||
| 115 | sshdConfig = '' | ||
| 116 | Port ${toString cfg.port} | ||
| 117 | |||
| 118 | PasswordAuthentication no | ||
| 119 | KbdInteractiveAuthentication no | ||
| 120 | |||
| 121 | ${flip concatMapStrings cfg.hostKeys (path: '' | ||
| 122 | HostKey ${initrdKeyPath path} | ||
| 123 | '')} | ||
| 124 | |||
| 125 | KexAlgorithms ${concatStringsSep "," sshdCfg.settings.KexAlgorithms} | ||
| 126 | Ciphers ${concatStringsSep "," sshdCfg.settings.Ciphers} | ||
| 127 | MACs ${concatStringsSep "," sshdCfg.settings.Macs} | ||
| 128 | |||
| 129 | LogLevel ${sshdCfg.settings.LogLevel} | ||
| 130 | |||
| 131 | ${if sshdCfg.settings.UseDns then '' | ||
| 132 | UseDNS yes | ||
| 133 | '' else '' | ||
| 134 | UseDNS no | ||
| 135 | ''} | ||
| 136 | |||
| 137 | ${cfg.extraConfig} | ||
| 138 | ''; | ||
| 139 | in mkIf (config.boot.initrd.network.enable && cfg.enable) { | ||
| 140 | assertions = [ | ||
| 141 | { | ||
| 142 | assertion = cfg.authorizedKeys != []; | ||
| 143 | message = "You should specify at least one authorized key for initrd SSH"; | ||
| 144 | } | ||
| 145 | |||
| 146 | { | ||
| 147 | assertion = cfg.hostKeys != []; | ||
| 148 | message = '' | ||
| 149 | You must now pre-generate the host keys for initrd SSH. | ||
| 150 | See the boot.initrd.network.ssh.hostKeys documentation | ||
| 151 | for instructions. | ||
| 152 | ''; | ||
| 153 | } | ||
| 154 | ]; | ||
| 155 | |||
| 156 | boot.initrd.extraUtilsCommands = '' | ||
| 157 | copy_bin_and_libs ${pkgs.openssh}/bin/sshd | ||
| 158 | cp -pv ${pkgs.glibc.out}/lib/libnss_files.so.* $out/lib | ||
| 159 | ''; | ||
| 160 | |||
| 161 | boot.initrd.extraUtilsCommandsTest = '' | ||
| 162 | # sshd requires a host key to check config, so we pass in the test's | ||
| 163 | tmpkey="$(mktemp initrd-ssh-testkey.XXXXXXXXXX)" | ||
| 164 | cp ${escapeShellArg (flakeInputs.nixpkgs.outPath + "/nixos/tests/initrd-network-ssh/ssh_host_ed25519_key")} "$tmpkey" | ||
| 165 | # keys from Nix store are world-readable, which sshd doesn't like | ||
| 166 | chmod 600 "$tmpkey" | ||
| 167 | echo -n ${escapeShellArg sshdConfig} | | ||
| 168 | $out/bin/sshd -t -f /dev/stdin \ | ||
| 169 | -h "$tmpkey" | ||
| 170 | rm "$tmpkey" | ||
| 171 | ''; | ||
| 172 | |||
| 173 | boot.initrd.network.postCommands = '' | ||
| 174 | echo '${cfg.shell}' > /etc/shells | ||
| 175 | echo 'root:x:0:0:root:/root:${cfg.shell}' > /etc/passwd | ||
| 176 | echo 'sshd:x:1:1:sshd:/var/empty:/bin/nologin' >> /etc/passwd | ||
| 177 | echo 'passwd: files' > /etc/nsswitch.conf | ||
| 178 | |||
| 179 | mkdir -p /var/log /var/empty | ||
| 180 | touch /var/log/lastlog | ||
| 181 | |||
| 182 | mkdir -p /etc/ssh | ||
| 183 | echo -n ${escapeShellArg sshdConfig} > /etc/ssh/sshd_config | ||
| 184 | |||
| 185 | echo "export PATH=$PATH" >> /etc/profile | ||
| 186 | echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> /etc/profile | ||
| 187 | |||
| 188 | mkdir -p /root/.ssh | ||
| 189 | ${concatStrings (map (key: '' | ||
| 190 | echo ${escapeShellArg key} >> /root/.ssh/authorized_keys | ||
| 191 | '') cfg.authorizedKeys)} | ||
| 192 | |||
| 193 | ${flip concatMapStrings cfg.hostKeys (path: '' | ||
| 194 | # keys from Nix store are world-readable, which sshd doesn't like | ||
| 195 | chmod 0600 "${initrdKeyPath path}" | ||
| 196 | '')} | ||
| 197 | |||
| 198 | /bin/sshd -e | ||
| 199 | ''; | ||
| 200 | |||
| 201 | boot.initrd.postMountCommands = '' | ||
| 202 | # Stop sshd cleanly before stage 2. | ||
| 203 | # | ||
| 204 | # If you want to keep it around to debug post-mount SSH issues, | ||
| 205 | # run `touch /.keep_sshd` (either from an SSH session or in | ||
| 206 | # another initrd hook like preDeviceCommands). | ||
| 207 | if ! [ -e /.keep_sshd ]; then | ||
| 208 | pkill -x sshd | ||
| 209 | fi | ||
| 210 | ''; | ||
| 211 | |||
| 212 | boot.initrd.secrets = mkIf cfg.manageHostKeySecrets (listToAttrs | ||
| 213 | (map (path: nameValuePair (initrdKeyPath path) path) cfg.hostKeys)); | ||
| 214 | }; | ||
| 215 | |||
| 216 | } | ||
