gen-ssh-config: generate string instead of file

This commit is contained in:
Sean Buckley 2024-05-28 20:32:16 -04:00
parent 58382a6458
commit def5192cf8

View file

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