rearrange ssh settings

This commit is contained in:
Sean Buckley 2023-07-07 15:34:00 -04:00
parent 2dc384bc82
commit bdeff9d709

View file

@ -14,12 +14,14 @@ let
attrsToLines = a: lib.concatLines (attrsToList a); attrsToLines = a: lib.concatLines (attrsToList a);
in in
builtins.toFile "ssh-config" ('' builtins.toFile "ssh-config" (
GlobalKnownHostsFile ${sshKnownHostsTxt} lib.concatMapStrings
'' + (host: ''
lib.concatMapStrings Host ${host}
(host: '' ${attrsToLines nixosConfigurations.${host}.config.deploy.ssh}
Host ${host} '')
${attrsToLines nixosConfigurations.${host}.config.deploy.ssh} (builtins.attrNames nixosConfigurations) +
'') ''
(builtins.attrNames nixosConfigurations)) GlobalKnownHostsFile ${sshKnownHostsTxt}
''
)