Merge pull request #287270 from mweinelt/lxd-networkd

nixos/lxd: use networkd for DHCP/RA
This commit is contained in:
Maciej Krüger 2024-02-11 15:40:59 +01:00 committed by GitHub
commit 7e2cabc5ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 32 additions and 4 deletions

View file

@ -13,8 +13,22 @@
./lxd.nix ./lxd.nix
]; ];
networking.useDHCP = false; networking = {
networking.interfaces.eth0.useDHCP = true; dhcdpcd.enable = false;
useDHCP = 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? system.stateVersion = "@stateVersion@"; # Did you read the comment?
} }

View file

@ -26,6 +26,20 @@
''; '';
# Network # Network
networking.useDHCP = false; networking = {
networking.interfaces.enp5s0.useDHCP = true; dhcdpcd.enable = false;
useDHCP = false;
};
systemd.network = {
enable = true;
networks."50-enp5s0" = {
matchConfig.Name = "enp5s0";
networkConfig = {
DHCP = "ipv4";
IPv6AcceptRA = true;
};
linkConfig.RequiredForOnline = "routable";
};
};
} }