Switch to systemd-networkd for chilly.

It should hopefully fix the issue where network doesn't come back after
a system config switch.
This commit is contained in:
2025-03-20 06:32:44 +00:00
parent 4e1068ecbd
commit 8454428f89

View File

@@ -40,19 +40,31 @@
users.users.ppetru.extraGroups = [ "libvirtd" ]; users.users.ppetru.extraGroups = [ "libvirtd" ];
networking = { networking.useNetworkd = true;
# TODO: try using DHCP for br0. will probably need a hardcoded MAC systemd.network.enable = true;
defaultGateway = "192.168.1.1";
nameservers = [ "192.168.1.1" ]; systemd.network.netdevs."10-br0" = {
bridges.br0.interfaces = [ "enp1s0" ]; netdevConfig = {
interfaces.br0 = { Name = "br0";
useDHCP = false; Kind = "bridge";
ipv4.addresses = [ # when switching to DHCP, fill this in with value from enp1s0 or something made up starting with 02:
{ # MACAddress = "";
"address" = "192.168.1.5"; };
"prefixLength" = 24; };
}
]; systemd.network.networks."20-enp1s0" = {
}; matchConfig.Name = "enp1s0";
networkConfig.Bridge = "br0";
};
systemd.network.networks."30-br0" = {
matchConfig.Name = "br0";
networkConfig = {
# TODO: use DHCP. Would need a hardcoded MAC (see above)
Address = [ "192.168.1.5/24" ];
Gateway = [ "192.168.1.1" ];
DNS = [ "192.168.1.1" ];
# DHCP = "yes";
};
}; };
} }