nixos-server: switch to networkd for interface management

This commit is contained in:
2026-08-16 13:34:46 -04:00
parent 5e9553a85c
commit dc59ca1501
+39 -2
View File
@@ -51,13 +51,50 @@ in
}; };
networking = { networking = {
useNetworkd = true;
firewall = { firewall = {
trustedInterfaces = [ "br0" ]; trustedInterfaces = [ "br0" ];
allowedTCPPorts = [ 22 ]; allowedTCPPorts = [ 22 ];
}; };
};
bridges.br0.interfaces = [ "eno1" ]; systemd.network = {
interfaces.br0.useDHCP = true; enable = true;
netdevs = {
"30-br0" = {
netdevConfig = {
Kind = "bridge";
Name = "br0";
MACAddress = "none";
};
};
};
networks = {
"30-eno1" = {
name = "eno1";
bridge = [ "br0" ];
};
"30-br0" = {
name = "br0";
DHCP = "yes";
};
};
links = {
"30-br0" = {
matchConfig = {
OriginalName = "br0";
};
linkConfig = {
MACAddressPolicy = "none";
};
};
};
}; };
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";