diff options
author | Adam C. Stephens <2071575+adamcstephens@users.noreply.github.com> | 2024-02-13 00:30:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 00:30:26 -0500 |
commit | fccf3732ef2ba21dc8bccff8484d89e416c30505 (patch) | |
tree | 58ff7c00236453b2dcd8d1ad484c50afffb21acf /nixos/maintainers/scripts/lxd/lxd-container-image.nix | |
parent | 8601deaed1bfe5893016310fe7c25885d8f55106 (diff) | |
parent | cf68af8561b4624738f10158960ce2748fa75877 (diff) |
Merge pull request #288123 from adamcstephens/incus/networkd
nixos/lxc: fix VM network and switch container to networkd
Diffstat (limited to 'nixos/maintainers/scripts/lxd/lxd-container-image.nix')
-rw-r--r-- | nixos/maintainers/scripts/lxd/lxd-container-image.nix | 20 |
1 files changed, 17 insertions, 3 deletions
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"; + }; + }; } |