ssh_config: add aliases to jakst hosts

This commit is contained in:
Motiejus Jakštys 2024-08-27 07:03:23 +03:00
parent c39a87dd5d
commit 0a4b11c2e4

View File

@ -23,10 +23,15 @@
] (_: null); ] (_: null);
in in
lib.mapAttrs (_name: builtins.intersectAttrs sshAttrs) myData.hosts; lib.mapAttrs (_name: builtins.intersectAttrs sshAttrs) myData.hosts;
extraConfig = '' extraConfig =
Host git.jakstys.lt ''
HostName ${myData.hosts."fwminex.servers.jakst".jakstIP} Host git.jakstys.lt
''; HostName ${myData.hosts."fwminex.servers.jakst".jakstIP}
''
+ (lib.concatMapStringsSep "\n" (host: ''
Host ${builtins.elemAt (lib.splitString "." host) 0}
HostName ${myData.hosts.${host}.jakstIP}
'') (builtins.attrNames (lib.filterAttrs (_: props: props ? jakstIP) myData.hosts)));
}; };
}; };
} }