39 lines
801 B
Nix
39 lines
801 B
Nix
|
{ pkgs, configs, ... }:
|
||
|
{
|
||
|
systemd.network = {
|
||
|
enable = true;
|
||
|
netdevs = {
|
||
|
"10-bond0" = {
|
||
|
netdevConfig = {
|
||
|
Kind = "bond";
|
||
|
Name = "bond0";
|
||
|
};
|
||
|
bondConfig = {
|
||
|
Mode = "802.3ad";
|
||
|
TransmitHashPolicy = "layer3+4";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
networks = {
|
||
|
"30-enp4s0" = {
|
||
|
matchConfig.Name = "enp4s0";
|
||
|
DHCP = "ipv4";
|
||
|
networkConfig.Bond = "bond0";
|
||
|
};
|
||
|
"30-enp6s0" = {
|
||
|
matchConfig.Name = "enp6s0";
|
||
|
DHCP = "ipv4";
|
||
|
networkConfig.Bond = "bond0";
|
||
|
};
|
||
|
"40-bond0" = {
|
||
|
matchConfig.Name = "bond0";
|
||
|
linkConfig = {
|
||
|
RequiredForOnline = "carrier";
|
||
|
};
|
||
|
|
||
|
networkConfig.LinkLocalAddressing = "no";
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|