nixos-module/*/network: enable LLDP

This commit is contained in:
Astro 2021-06-14 22:00:06 +02:00
parent ff6933fa1a
commit efe6bf342a
2 changed files with 11 additions and 1 deletions

View File

@ -35,6 +35,8 @@ in
networkConfig = {
IPForward = config.site.hosts.${hostName}.isRouter;
IPv6AcceptRA = lib.mkDefault false;
LLDP = true;
EmitLLDP = true;
};
addresses =

View File

@ -73,7 +73,11 @@ in
en = {
# physical ethernet ports
matchConfig.Name = "en*";
networkConfig.Bond = "bond0";
networkConfig = {
Bond = "bond0";
LLDP = true;
EmitLLDP = true;
};
};
bond0 = {
DHCP = "no";
@ -81,6 +85,8 @@ in
networkConfig = {
VLAN = map (net: "ext-${net}") ctNets;
LinkLocalAddressing = "no";
LLDP = true;
EmitLLDP = true;
};
};
} // (builtins.foldl' (result: net: result // {
@ -91,6 +97,8 @@ in
# networkd going into operational state.
DHCP = lib.mkDefault "no";
LinkLocalAddressing = lib.mkDefault "no";
LLDP = true;
EmitLLDP = true;
};
};
}) {} bridgeNets) // builtins.foldl' (result: net: result // {