diff options
| author | quentin@aristote.fr <quentin@aristote.fr> | 2025-02-05 10:57:44 +0100 |
|---|---|---|
| committer | quentin@aristote.fr <quentin@aristote.fr> | 2025-02-05 10:57:44 +0100 |
| commit | a983cf12cddd0afe07af35d6e17ad8f4a1f75b09 (patch) | |
| tree | d76078a8ee70f0cc53ad86791b2e3b8495caa1b9 /modules/nixos/personal | |
| parent | 63ec5ee74ccea235f6e89e882309b9e314f9cf8b (diff) | |
nixos: upgrade: add remote builders to checkHosts
Diffstat (limited to 'modules/nixos/personal')
| -rw-r--r-- | modules/nixos/personal/nix.nix | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/modules/nixos/personal/nix.nix b/modules/nixos/personal/nix.nix index 0d17148..99496fa 100644 --- a/modules/nixos/personal/nix.nix +++ b/modules/nixos/personal/nix.nix @@ -155,22 +155,23 @@ in { }; }) - (lib.mkIf cfg.remoteBuilds.enable { + (lib.mkIf cfg.remoteBuilds.enable (with cfg.remoteBuilds.machines.hephaistos; { nix = { distributedBuilds = true; settings.builders-use-substitutes = true; - buildMachines = with cfg.remoteBuilds.machines.hephaistos; - lib.optional enable { - inherit protocol speedFactor; - hostName = "hephaistos.${domain}"; - system = "x86_64-linux"; - maxJobs = 4; - supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"]; - mandatoryFeatures = []; - }; + buildMachines = lib.optional enable { + inherit protocol speedFactor; + hostName = "hephaistos.${domain}"; + system = "x86_64-linux"; + maxJobs = 4; + supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"]; + mandatoryFeatures = []; + }; }; - programs.ssh = with cfg.remoteBuilds.machines.hephaistos; { + personal.nix.autoUpgrade.checkHosts = ["hephaistos.${domain}"]; + + programs.ssh = { extraConfig = lib.optionalString enable '' Host hephaistos.${domain} # Prevent using ssh-agent or another keyfile, useful for testing @@ -182,6 +183,6 @@ in { ''; knownHosts."hephaistos.${domain}".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHvtqi8tziBuviUV8LDK2ddQQUbHdJYB02dgWTK5Olxq"; }; - }) + })) ]); } |
