about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/tasks/network-interfaces-systemd.nix2
1 files changed, 1 insertions, 1 deletions
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 ];