nixos/network-interfaces: Support mac address and mtu universally
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user