fra1-b: use spipe with shorthand

This commit is contained in:
2024-09-30 22:26:54 +03:00
parent 78545ebab4
commit 00f806f63a
3 changed files with 16 additions and 11 deletions

View File

@@ -27,11 +27,19 @@
''
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)));
+ (lib.concatMapStringsSep "\n"
(host: ''
Host ${builtins.elemAt (lib.splitString "." host) 0}
HostName ${myData.hosts.${host}.jakstIP}
'')
(
builtins.attrNames (
lib.filterAttrs (name: props: name != "fra1-b.servers.jakst" && props ? jakstIP) myData.hosts
)
)
);
};
};
}