bond network config
This commit is contained in:
parent
8e7aab6427
commit
5b1ff6ef26
|
@ -182,16 +182,6 @@
|
|||
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
|
|
38
workstation/network.nix
Normal file
38
workstation/network.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
10
workstation/network.nix~
Normal file
10
workstation/network.nix~
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ plgs, configs, ... }:
|
||||
{
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."10-lan" = {
|
||||
matchConfig.Name = "lan";
|
||||
networkConfig.DHCP = "ipv4";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue