0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 14:10:33 +03:00

Add macvlan support for declarative containers

This commit is contained in:
montag451 2016-12-06 00:11:49 +01:00 committed by Jörg Thalheim
parent 42a0fc4387
commit 4889c271ca
2 changed files with 94 additions and 0 deletions

View file

@ -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
''}