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 { (lib.mkIf isClient {
programs.ssh = { programs.ssh = {
knownHosts = buildServerKnownHosts; knownHosts = buildServerKnownHosts;
extraConfig = '' extraConfig = lib.concatStringsSep "\n" (
Match Host ${lib.concatStringsSep " " (lib.attrNames buildServerDevices)} User ${buildUser} lib.mapAttrsToList (name: _: ''
Match host ${name} user ${buildUser}
IdentityFile ${clientSshKeyPath} IdentityFile ${clientSshKeyPath}
IdentitiesOnly yes IdentitiesOnly yes
''; '') buildServerDevices
);
}; };
nix = { nix = {
distributedBuilds = buildMachines != [ ]; distributedBuilds = buildMachines != [ ];