From def5192cf8dd8ed8547be2a8168fcae61e2ab9d2 Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Tue, 28 May 2024 20:32:16 -0400 Subject: [PATCH] gen-ssh-config: generate string instead of file --- lib/gen-ssh-config.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/gen-ssh-config.nix b/lib/gen-ssh-config.nix index 4a21902..c2164fc 100644 --- a/lib/gen-ssh-config.nix +++ b/lib/gen-ssh-config.nix @@ -14,12 +14,10 @@ let attrsToLines = a: lib.concatLines (attrsToList a); in -builtins.toFile "ssh-config" ( - lib.concatMapStrings - (host: '' - Host ${host} - UserKnownHostsFile ${sshKnownHostsTxt} - ${attrsToLines nixosConfigurations.${host}.config.deploy.ssh} - '') - (builtins.attrNames nixosConfigurations) -) +lib.concatMapStrings + (host: '' + Host ${host} + UserKnownHostsFile ${sshKnownHostsTxt} + ${attrsToLines nixosConfigurations.${host}.config.deploy.ssh} + '') + (builtins.attrNames nixosConfigurations)