summary refs log tree commit diff
path: root/nixos/modules/virtualisation/containers.nix
diff options
context:
space:
mode:
authormontag451 <montag451@laposte.net>2016-12-06 00:11:49 +0100
committerJörg Thalheim <joerg@higgsboson.tk>2016-12-12 07:34:28 +0100
commit4889c271cacf72a47dc2f081e6e718980fb80d60 (patch)
treeb6bb970d3f28804ab7727fee0bcbf5a2de4dd831 /nixos/modules/virtualisation/containers.nix
parent42a0fc438755b84fc2bb09fe5733238dccebe0fe (diff)
downloadnixlib-4889c271cacf72a47dc2f081e6e718980fb80d60.tar
nixlib-4889c271cacf72a47dc2f081e6e718980fb80d60.tar.gz
nixlib-4889c271cacf72a47dc2f081e6e718980fb80d60.tar.bz2
nixlib-4889c271cacf72a47dc2f081e6e718980fb80d60.tar.lz
nixlib-4889c271cacf72a47dc2f081e6e718980fb80d60.tar.xz
nixlib-4889c271cacf72a47dc2f081e6e718980fb80d60.tar.zst
nixlib-4889c271cacf72a47dc2f081e6e718980fb80d60.zip
Add macvlan support for declarative containers
Diffstat (limited to 'nixos/modules/virtualisation/containers.nix')
-rw-r--r--nixos/modules/virtualisation/containers.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix
index a532696d03ae..637a87139045 100644
--- a/nixos/modules/virtualisation/containers.nix
+++ b/nixos/modules/virtualisation/containers.nix
@@ -476,6 +476,17 @@ in
               '';
             };
 
+            macvlans = mkOption {
+              type = types.listOf types.str;
+              default = [];
+              example = [ "eth1" "eth2" ];
+              description = ''
+                The list of host interfaces from which macvlans will be
+                created. For each interface specified, a macvlan interface
+                will be created and moved to the container.
+              '';
+            };
+
             extraVeths = mkOption {
               type = with types; attrsOf (submodule { options = networkOptions; });
               default = {};
@@ -654,6 +665,7 @@ in
               ''}
             ''}
             INTERFACES="${toString cfg.interfaces}"
+            MACVLANS="${toString cfg.macvlans}"
             ${optionalString cfg.autoStart ''
               AUTO_START=1
             ''}