1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00

nixos/networking: fix setting .macAddress and .mtu with networkd

This needs to be set in the .linkConfig of a .network
This commit is contained in:
Florian Klink 2020-04-13 15:18:59 +02:00
parent ad06ae4195
commit cddc7a28b8

View file

@ -94,7 +94,12 @@ in
address = forEach (interfaceIps i)
(ip: "${ip.address}/${toString ip.prefixLength}");
networkConfig.IPv6PrivacyExtensions = "kernel";
} ];
linkConfig = optionalAttrs (i.macAddress != null) {
MACAddress = i.macAddress;
} // optionalAttrs (i.mtu != null) {
MTUBytes = toString i.mtu;
};
}];
})))
(mkMerge (flip mapAttrsToList cfg.bridges (name: bridge: {
netdevs."40-${name}" = {