diff options
author | tv <tv@krebsco.de> | 2019-01-31 15:02:05 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2019-01-31 15:06:16 +0100 |
commit | a09bf933da2d31645872f1e2332507da98fb6a00 (patch) | |
tree | ffd6c5d9bbeeba80d89b50dee34885ebbdd72cb0 /krebs/3modules | |
parent | 5c076d9f37dc495b7a61cae84c5600b1ff7a5d09 (diff) |
krebs-hosts_combined: init
Diffstat (limited to 'krebs/3modules')
-rw-r--r-- | krebs/3modules/hosts.nix | 20 |
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 { |