fix: network config jank

This commit is contained in:
Leyla Becker 2026-03-18 20:45:17 -05:00
parent 69c10a87b6
commit dc8a946de7
2 changed files with 15 additions and 4 deletions

View file

@ -113,6 +113,10 @@
}; };
}; };
# bond0 and wg0 are managed by systemd-networkd; tell NetworkManager to
# leave them alone so NM-wait-online doesn't time out waiting for them.
networking.networkmanager.unmanaged = ["bond0" "wg0" "eno1" "eno2"];
systemd.network = { systemd.network = {
enable = true; enable = true;
@ -123,8 +127,8 @@
Name = "bond0"; Name = "bond0";
}; };
bondConfig = { bondConfig = {
Mode = "802.3ad"; Mode = "active-backup";
TransmitHashPolicy = "layer3+4"; PrimaryReselectPolicy = "always";
}; };
}; };
@ -158,7 +162,7 @@
networkConfig.DHCP = "yes"; networkConfig.DHCP = "yes";
address = [ address = [
"192.168.1.10/32" "192.168.1.2/24"
]; ];
# Set lower priority for default gateway to allow WireGuard interface binding # Set lower priority for default gateway to allow WireGuard interface binding
@ -174,6 +178,8 @@
"50-wg0" = { "50-wg0" = {
matchConfig.Name = "wg0"; matchConfig.Name = "wg0";
# Don't block networkd-wait-online on the VPN tunnel coming up
linkConfig.RequiredForOnline = "no";
networkConfig = { networkConfig = {
DHCP = "no"; DHCP = "no";
}; };

View file

@ -44,11 +44,16 @@
networks = { networks = {
"30-eno1" = { "30-eno1" = {
matchConfig.Name = "eno1"; matchConfig.Name = "eno1";
networkConfig.Bond = "bond0"; networkConfig = {
Bond = "bond0";
PrimarySlave = true;
};
linkConfig.RequiredForOnline = "enslaved";
}; };
"30-eno2" = { "30-eno2" = {
matchConfig.Name = "eno2"; matchConfig.Name = "eno2";
networkConfig.Bond = "bond0"; networkConfig.Bond = "bond0";
linkConfig.RequiredForOnline = "enslaved";
}; };
}; };
}; };