mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
ssh : fix formatting
This commit is contained in:
parent
2d6778ce80
commit
905b55197b
1 changed files with 8 additions and 9 deletions
|
@ -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))}
|
||||
|
|
Loading…
Reference in a new issue