mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 11:45:45 +03:00
treewide: migrate nixos modules to networking.hosts
Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
This commit is contained in:
parent
d859e3fcb9
commit
cd64f1bd87
4 changed files with 27 additions and 27 deletions
|
@ -1084,14 +1084,10 @@ in
|
|||
) config.containers;
|
||||
|
||||
# Generate /etc/hosts entries for the containers.
|
||||
networking.extraHosts = concatStrings (
|
||||
mapAttrsToList (
|
||||
name: cfg:
|
||||
optionalString (cfg.localAddress != null) ''
|
||||
${head (splitString "/" cfg.localAddress)} ${name}.containers
|
||||
''
|
||||
) config.containers
|
||||
);
|
||||
networking.hosts = lib.mapAttrs' (name: cfg: {
|
||||
name = head (splitString "/" cfg.localAddress);
|
||||
value = lib.optionals (cfg.localAddress != null) [ "${name}.containers" ];
|
||||
}) config.containers;
|
||||
|
||||
networking.dhcpcd.denyInterfaces = [
|
||||
"ve-*"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue