diff options
Diffstat (limited to 'nixos/maintainers')
4 files changed, 40 insertions, 9 deletions
diff --git a/nixos/maintainers/scripts/lxd/lxd-container-image-inner.nix b/nixos/maintainers/scripts/lxd/lxd-container-image-inner.nix index ef00c6f86cbd6..4698971de8ffe 100644 --- a/nixos/maintainers/scripts/lxd/lxd-container-image-inner.nix +++ b/nixos/maintainers/scripts/lxd/lxd-container-image-inner.nix @@ -13,8 +13,23 @@ ./lxd.nix ]; - networking.useDHCP = false; - networking.interfaces.eth0.useDHCP = true; + networking = { + dhcpcd.enable = false; + useDHCP = false; + useHostResolvConf = false; + }; + + systemd.network = { + enable = true; + networks."50-eth0" = { + matchConfig.Name = "eth0"; + networkConfig = { + DHCP = "ipv4"; + IPv6AcceptRA = true; + }; + linkConfig.RequiredForOnline = "routable"; + }; + }; system.stateVersion = "@stateVersion@"; # Did you read the comment? } diff --git a/nixos/maintainers/scripts/lxd/lxd-container-image.nix b/nixos/maintainers/scripts/lxd/lxd-container-image.nix index b77f9f5aabe09..3f330952d6959 100644 --- a/nixos/maintainers/scripts/lxd/lxd-container-image.nix +++ b/nixos/maintainers/scripts/lxd/lxd-container-image.nix @@ -25,7 +25,21 @@ fi ''; - # Network - networking.useDHCP = false; - networking.interfaces.eth0.useDHCP = true; + networking = { + dhcpcd.enable = false; + useDHCP = false; + useHostResolvConf = false; + }; + + systemd.network = { + enable = true; + networks."50-eth0" = { + matchConfig.Name = "eth0"; + networkConfig = { + DHCP = "ipv4"; + IPv6AcceptRA = true; + }; + linkConfig.RequiredForOnline = "routable"; + }; + }; } diff --git a/nixos/maintainers/scripts/lxd/lxd-virtual-machine-image-inner.nix b/nixos/maintainers/scripts/lxd/lxd-virtual-machine-image-inner.nix index 2d1761401fcd2..d1264fa043042 100644 --- a/nixos/maintainers/scripts/lxd/lxd-virtual-machine-image-inner.nix +++ b/nixos/maintainers/scripts/lxd/lxd-virtual-machine-image-inner.nix @@ -14,14 +14,15 @@ ]; networking = { - dhcdpcd.enable = false; + dhcpcd.enable = false; useDHCP = false; + useHostResolvConf = false; }; systemd.network = { enable = true; - networks."50-eth0" = { - matchConfig.Name = "eth0"; + networks."50-enp5s0" = { + matchConfig.Name = "enp5s0"; networkConfig = { DHCP = "ipv4"; IPv6AcceptRA = true; diff --git a/nixos/maintainers/scripts/lxd/lxd-virtual-machine-image.nix b/nixos/maintainers/scripts/lxd/lxd-virtual-machine-image.nix index a585799144657..bbbdd1f3fa173 100644 --- a/nixos/maintainers/scripts/lxd/lxd-virtual-machine-image.nix +++ b/nixos/maintainers/scripts/lxd/lxd-virtual-machine-image.nix @@ -27,8 +27,9 @@ # Network networking = { - dhcdpcd.enable = false; + dhcpcd.enable = false; useDHCP = false; + useHostResolvConf = false; }; systemd.network = { |