From 3558f96edd76b7db82932bfbaa5dd8663e61a483 Mon Sep 17 00:00:00 2001 From: paki23 Date: Mon, 8 Apr 2024 15:06:32 +0200 Subject: [PATCH] ssh : fix formatting --- modules/programs/ssh.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/programs/ssh.nix b/modules/programs/ssh.nix index 5dff919d1..b63d577da 100644 --- a/modules/programs/ssh.nix +++ b/modules/programs/ssh.nix @@ -537,15 +537,14 @@ in { home.file.".ssh/config".source = mkIf cfg.internallyManaged cfg.configPath; - programs.ssh.configPath = - let - sortedMatchBlocks = hm.dag.topoSort cfg.matchBlocks; - sortedMatchBlocksStr = builtins.toJSON sortedMatchBlocks; - matchBlocks = - sortedMatchBlocks.result or abort "Dependency cycle in SSH match blocks: ${sortedMatchBlocksStr}"; - in pkgs.writeText "ssh_config" '' - ${concatStringsSep "\n" ( - (mapAttrsToList (n: v: "${n} ${v}") cfg.extraOptionOverrides) + programs.ssh.configPath = let + sortedMatchBlocks = hm.dag.topoSort cfg.matchBlocks; + sortedMatchBlocksStr = builtins.toJSON sortedMatchBlocks; + matchBlocks = sortedMatchBlocks.result or (abort + "Dependency cycle in SSH match blocks: ${sortedMatchBlocksStr}"); + in pkgs.writeText "ssh_config" '' + ${concatStringsSep "\n" + ((mapAttrsToList (n: v: "${n} ${v}") cfg.extraOptionOverrides) ++ (optional (cfg.includes != [ ]) '' Include ${concatStringsSep " " cfg.includes} '') ++ (map (block: matchBlockStr block.name block.data) matchBlocks))}