summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2019-01-31 15:02:05 +0100
committerlassulus <lassulus@lassul.us>2019-02-08 05:19:48 +0100
commit659cbed237ebbf158374cc85929f97eb1a6fce36 (patch)
treefd10c4283977d76d0bd566b0eec70f2120b68f5e /krebs/3modules
parentbc4984c7fa6a50052436399364d2de7f76f1cd2e (diff)
krebs-hosts_combined: init
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/hosts.nix20
1 files changed, 12 insertions, 8 deletions
diff --git a/krebs/3modules/hosts.nix b/krebs/3modules/hosts.nix
index eb7fd2283..3d572c04d 100644
--- a/krebs/3modules/hosts.nix
+++ b/krebs/3modules/hosts.nix
@@ -62,13 +62,6 @@ in {
{}
(attrValues config.krebs.hosts);
- # allAddrAliases : [addrAliases]
- allAddrAliases =
- flatten
- (map
- (host: attrValues (hostNetAliases host))
- (attrValues config.krebs.hosts));
-
# writeHosts : str -> [addrAliases] -> package
writeHosts = name: addrAliases: super.writeText name ''
${concatMapStringsSep
@@ -78,7 +71,18 @@ in {
'';
in
{
- krebs-hosts = writeHosts "krebs-hosts" allAddrAliases;
+ # hosts file for all krebs networks
+ krebs-hosts =
+ writeHosts "krebs-hosts" (concatLists [
+ netAliases.internet
+ netAliases.retiolum
+ netAliases.wiregrill
+ ]);
+
+ # combined hosts file for all networks (even custom ones)
+ krebs-hosts_combined =
+ writeHosts "krebs-hosts_combined"
+ (concatLists (attrValues netAliases));
}
//
genAttrs' (attrNames netAliases) (netname: rec {