nixos/network-interfaces: Support mac address and mtu universally

This commit is contained in:
William A. Kennington III
2014-11-26 11:22:03 -08:00
parent 2057d9087f
commit c7d46687c5
3 changed files with 56 additions and 60 deletions
@@ -59,15 +59,6 @@ in
networks."99-main" = genericNetwork mkDefault;
}
(mkMerge (flip map interfaces (i: {
links."40-${i.name}" = {
matchConfig.Name = i.name;
linkConfig =
(optionalAttrs (i.macAddress != null) {
MACAddress = i.macAddress;
}) // (optionalAttrs (i.mtu != null) {
MTUBytes = toString i.mtu;
});
};
netdevs = mkIf i.virtual (
let
devType = if i.virtualType != null then i.virtualType