Stop using systemd-networkd it has some flaws with NixOS' networking I need to figure out later.

It is very elegant, easy to debug/understand, and I definitely want to use it but The most significant
problem is it doesn't work with NixOS containers private networking.  So I'll need to figure that out
or maybe it will be fixed upstream soon.
This commit is contained in:
Zuckerberg 2025-08-05 19:27:23 -07:00
parent cf560d4e53
commit 01b01f06b4

View File

@ -58,25 +58,34 @@
};
swapDevices = [ ];
systemd.network.enable = true;
### networking ###
# systemd.network.enable = true;
networking = {
useNetworkd = true;
dhcpcd.enable = true;
# useNetworkd = true;
dhcpcd.enable = false;
vlans = {
main = {
id = 1;
interface = "eth1";
};
iot = {
id = 2;
interface = "eth1";
};
};
# Shouldn't be needed but it is. DHCP only works for a day or so while without these.
# This ensures that each interface is configured with DHCP
interfaces."main".useDHCP = true;
interfaces."iot".useDHCP = true;
interfaces.eth1.ipv4.addresses = [{
address = "192.168.1.2";
prefixLength = 21;
}];
interfaces.iot.ipv4.addresses = [{
address = "192.168.9.8";
prefixLength = 22;
}];
defaultGateway = {
interface = "eth1";
address = "192.168.1.1";
};
nameservers = [ "1.1.1.1" "8.8.8.8" ];
};
powerManagement.cpuFreqGovernor = "powersave";