diff options
author | Ian-Woo Kim <ianwookim@gmail.com> | 2016-12-02 13:21:03 -0800 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2017-02-15 05:12:46 +0100 |
commit | a238c8a575a0397861e75b9509ded670f9e6381b (patch) | |
tree | 29db8f195581b1573c08ebf724a81cea8156a0c1 /nixos/modules/virtualisation/containers.nix | |
parent | 3490508ed1708a7dad1307a5739665b51df9b34d (diff) |
nixos-container: add --port option for nixos-container (forward network ports to systemd-nspawn container)
Diffstat (limited to 'nixos/modules/virtualisation/containers.nix')
-rw-r--r-- | nixos/modules/virtualisation/containers.nix | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix index 7d445fa0951e..7193029d4518 100644 --- a/nixos/modules/virtualisation/containers.nix +++ b/nixos/modules/virtualisation/containers.nix @@ -89,6 +89,9 @@ let if [ -n "$HOST_BRIDGE" ]; then extraFlags+=" --network-bridge=$HOST_BRIDGE" fi + if [ -n "$HOST_PORT" ]; then + extraFlags+=" --port=$HOST_PORT" + fi fi extraFlags+=" ${concatStringsSep " " (mapAttrsToList nspawnExtraVethArgs cfg.extraVeths)}" |