From a983cf12cddd0afe07af35d6e17ad8f4a1f75b09 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Wed, 5 Feb 2025 10:57:44 +0100 Subject: nixos: upgrade: add remote builders to checkHosts --- modules/nixos/personal/nix.nix | 25 +++++++++++++------------ 1 file 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"; }; - }) + })) ]); } -- cgit v1.2.3