From bdeff9d709266b8c3d7e89fbb7a63c99db4b971c Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Fri, 7 Jul 2023 15:34:00 -0400 Subject: [PATCH] rearrange ssh settings --- lib/gen-ssh-config.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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} + '' +)