diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-09-07 21:28:33 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-09-07 21:28:33 +0200 |
commit | 916793cf130a8269bbda881e9081370d74595538 (patch) | |
tree | 11c9e5d14f3178c6daf5a9c0a85f8a9e469ac356 /nixos/modules/virtualisation/containers.nix | |
parent | 026c31dd9d6570fc6d7475c0102745cbfb0d6972 (diff) | |
parent | 86eaeb4c0a31e623c01f0d39fd5b3e64ce5f80b5 (diff) | |
download | nixlib-916793cf130a8269bbda881e9081370d74595538.tar nixlib-916793cf130a8269bbda881e9081370d74595538.tar.gz nixlib-916793cf130a8269bbda881e9081370d74595538.tar.bz2 nixlib-916793cf130a8269bbda881e9081370d74595538.tar.lz nixlib-916793cf130a8269bbda881e9081370d74595538.tar.xz nixlib-916793cf130a8269bbda881e9081370d74595538.tar.zst nixlib-916793cf130a8269bbda881e9081370d74595538.zip |
Merge branch 'master' into systemd-219
Conflicts: nixos/modules/system/boot/systemd.nix pkgs/applications/networking/p2p/transmission/default.nix pkgs/development/libraries/libseccomp/default.nix pkgs/os-specific/linux/systemd/default.nix pkgs/top-level/all-packages.nix
Diffstat (limited to 'nixos/modules/virtualisation/containers.nix')
-rw-r--r-- | nixos/modules/virtualisation/containers.nix | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix index da39dda85353..59f486ff78b7 100644 --- a/nixos/modules/virtualisation/containers.nix +++ b/nixos/modules/virtualisation/containers.nix @@ -120,6 +120,15 @@ in ''; }; + interfaces = mkOption { + type = types.listOf types.string; + default = []; + example = [ "eth1" "eth2" ]; + description = '' + The list of interfaces to be moved into the container. + ''; + }; + autoStart = mkOption { type = types.bool; default = false; @@ -218,6 +227,10 @@ in extraFlags+=" --network-veth" fi + for iface in $INTERFACES; do + extraFlags+=" --network-interface=$iface" + done + for iface in $MACVLANS; do extraFlags+=" --network-macvlan=$iface" done @@ -331,6 +344,7 @@ in LOCAL_ADDRESS=${cfg.localAddress} ''} ''} + INTERFACES="${toString cfg.interfaces}" ${optionalString cfg.autoStart '' AUTO_START=1 ''} |