diff --git a/nixos/modules/tasks/network-interfaces-systemd.nix b/nixos/modules/tasks/network-interfaces-systemd.nix index 334b24b5ad38..997c18046737 100644 --- a/nixos/modules/tasks/network-interfaces-systemd.nix +++ b/nixos/modules/tasks/network-interfaces-systemd.nix @@ -124,7 +124,7 @@ in Name = name; Kind = "macvlan"; }; - macvlanConfig.Mode = macvlan.mode; + macvlanConfig = optionalAttrs (macvlan.mode != null) { Mode = macvlan.mode; }; }; networks."40-${macvlan.interface}" = (mkMerge [ (genericNetwork (mkOverride 999)) { macvlan = [ name ];