mic92: add v4/v6 aliases to etc hosts
this is convinient when you only want to speak a certain protocol
This commit is contained in:
parent
e6a8d37846
commit
e87f9e002b
@ -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] }
|
||||
|
Loading…
Reference in New Issue
Block a user