Revert "treewide: migrate nixos modules to networking.hosts"
This reverts commit cd64f1bd87.
This commit is contained in:
@@ -1084,10 +1084,14 @@ in
|
||||
) config.containers;
|
||||
|
||||
# Generate /etc/hosts entries for the containers.
|
||||
networking.hosts = lib.mapAttrs' (name: cfg: {
|
||||
name = head (splitString "/" cfg.localAddress);
|
||||
value = lib.optionals (cfg.localAddress != null) [ "${name}.containers" ];
|
||||
}) config.containers;
|
||||
networking.extraHosts = concatStrings (
|
||||
mapAttrsToList (
|
||||
name: cfg:
|
||||
optionalString (cfg.localAddress != null) ''
|
||||
${head (splitString "/" cfg.localAddress)} ${name}.containers
|
||||
''
|
||||
) config.containers
|
||||
);
|
||||
|
||||
networking.dhcpcd.denyInterfaces = [
|
||||
"ve-*"
|
||||
|
||||
Reference in New Issue
Block a user