distributed builds: fix ssh only accepting build key for real

This commit is contained in:
müde 2026-05-03 13:46:30 +02:00
parent 704e14251f
commit e394a6e21e

View file

@ -102,11 +102,13 @@ in
(lib.mkIf isClient {
programs.ssh = {
knownHosts = buildServerKnownHosts;
extraConfig = ''
Match Host ${lib.concatStringsSep " " (lib.attrNames buildServerDevices)} User ${buildUser}
extraConfig = lib.concatStringsSep "\n" (
lib.mapAttrsToList (name: _: ''
Match host ${name} user ${buildUser}
IdentityFile ${clientSshKeyPath}
IdentitiesOnly yes
'';
'') buildServerDevices
);
};
nix = {
distributedBuilds = buildMachines != [ ];