mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixos/lxd: use networkd for DHCP/RA
Enables networkd instead of dhcpcd for DHCP/RA. It offers a solid base for network configuration, that is much more extensible than dhcpcd and also better maintained than our bespoke `networking.interfaces` modules. Closes: #287269
This commit is contained in:
parent
6f5673f731
commit
73e19e1a8d
@ -13,8 +13,22 @@
|
||||
./lxd.nix
|
||||
];
|
||||
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.eth0.useDHCP = true;
|
||||
networking = {
|
||||
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?
|
||||
}
|
||||
|
@ -26,6 +26,20 @@
|
||||
'';
|
||||
|
||||
# Network
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.enp5s0.useDHCP = true;
|
||||
networking = {
|
||||
dhcdpcd.enable = false;
|
||||
useDHCP = false;
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."50-enp5s0" = {
|
||||
matchConfig.Name = "enp5s0";
|
||||
networkConfig = {
|
||||
DHCP = "ipv4";
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
linkConfig.RequiredForOnline = "routable";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user