From e87f9e002bfb458ea9ab6dcdab482df315b94d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 22 Aug 2020 09:07:03 +0100 Subject: mic92: add v4/v6 aliases to etc hosts this is convinient when you only want to speak a certain protocol --- krebs/3modules/hosts.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'krebs/3modules') diff --git a/krebs/3modules/hosts.nix b/krebs/3modules/hosts.nix index 159b54e34..ae0136303 100644 --- a/krebs/3modules/hosts.nix +++ b/krebs/3modules/hosts.nix @@ -48,7 +48,9 @@ in { hostNetAliases = host: mapAttrs (_: net: filter (x: x.name != null && x.value != []) [ { name = net.ip4.addr or null; value = net.aliases; } + { name = net.ip4.addr or null; value = (map (alias: "4.${alias}") net.aliases); } { name = net.ip6.addr or null; value = net.aliases; } + { name = net.ip6.addr or null; value = (map (alias: "6.${alias}") net.aliases); } ]) host.nets; # netAliases : { ${netname} : [addrAliases] } -- cgit v1.2.3