diff --git a/lib/gen-ssh-config.nix b/lib/gen-ssh-config.nix index abb4b6f..f017051 100644 --- a/lib/gen-ssh-config.nix +++ b/lib/gen-ssh-config.nix @@ -14,12 +14,14 @@ let attrsToLines = a: lib.concatLines (attrsToList a); in -builtins.toFile "ssh-config" ('' - GlobalKnownHostsFile ${sshKnownHostsTxt} -'' + -lib.concatMapStrings - (host: '' - Host ${host} - ${attrsToLines nixosConfigurations.${host}.config.deploy.ssh} - '') - (builtins.attrNames nixosConfigurations)) +builtins.toFile "ssh-config" ( + lib.concatMapStrings + (host: '' + Host ${host} + ${attrsToLines nixosConfigurations.${host}.config.deploy.ssh} + '') + (builtins.attrNames nixosConfigurations) + + '' + GlobalKnownHostsFile ${sshKnownHostsTxt} + '' +)