nixos-module/server/network: disable all addresses on bridges to make networkd happy

This commit is contained in:
Astro 2021-04-05 01:18:08 +02:00
parent 7da882f324
commit 276bb732c7
1 changed files with 7 additions and 3 deletions

View File

@ -68,15 +68,19 @@ in
networkConfig.Bond = "bond0";
};
bond0 = {
DHCP = "no";
matchConfig.Name = "bond0";
networkConfig.VLAN = map (net: "ext-${net}") ctNets;
networkConfig = {
VLAN = map (net: "ext-${net}") ctNets;
LinkLocalAddressing = "no";
};
};
} // builtins.foldl' (result: net: result // {
"${net}" = {
matchConfig.Name = net;
networkConfig = {
IPForward = config.site.hosts.${hostName}.isRouter;
IPv6AcceptRA = !config.site.hosts.${hostName}.isRouter;
DHCP = lib.mkDefault "no";
LinkLocalAddressing = lib.mkDefault "no";
};
};
}) {} bridgeNets;