summary refs log tree commit diff
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/containers.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix
index 08c234b94133..a0238277f5d0 100644
--- a/nixos/modules/virtualisation/containers.nix
+++ b/nixos/modules/virtualisation/containers.nix
@@ -189,9 +189,13 @@ in
               "/nix/var/nix/gcroots/per-container/$INSTANCE"
 
             if [ "$PRIVATE_NETWORK" = 1 ]; then
-              extraFlags="--network-veth"
+              extraFlags+=" --network-veth"
             fi
 
+            for iface in $MACVLANS; do
+              extraFlags+=" --network-macvlan=$iface"
+            done
+
             # If the host is 64-bit and the container is 32-bit, add a
             # --personality flag.
             ${optionalString (config.nixpkgs.system == "x86_64-linux") ''