diff options
author | Ian-Woo Kim <ianwookim@gmail.com> | 2016-11-27 02:37:50 -0800 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2017-02-15 05:12:46 +0100 |
commit | 3490508ed1708a7dad1307a5739665b51df9b34d (patch) | |
tree | 457dea8692bc07427f1ff1f50832c6d2c6a16369 /pkgs/tools/virtualization/nixos-container | |
parent | 44c3bfbc109f8f81a06eaa2ed8440ca052d47ea4 (diff) |
nixos-container: support bridge.
Diffstat (limited to 'pkgs/tools/virtualization/nixos-container')
-rwxr-xr-x | pkgs/tools/virtualization/nixos-container/nixos-container.pl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/tools/virtualization/nixos-container/nixos-container.pl b/pkgs/tools/virtualization/nixos-container/nixos-container.pl index 5cb7e3b560b8..18ee2f111b41 100755 --- a/pkgs/tools/virtualization/nixos-container/nixos-container.pl +++ b/pkgs/tools/virtualization/nixos-container/nixos-container.pl @@ -16,7 +16,7 @@ umask 0022; sub showHelp { print <<EOF; Usage: nixos-container list - nixos-container create <container-name> [--nixos-path <path>] [--system-path <path>] [--config-file <path>] [--config <string>] [--ensure-unique-name] [--auto-start] + nixos-container create <container-name> [--nixos-path <path>] [--system-path <path>] [--config-file <path>] [--config <string>] [--ensure-unique-name] [--auto-start] [--bridge <iface>] nixos-container destroy <container-name> nixos-container start <container-name> nixos-container stop <container-name> @@ -36,6 +36,7 @@ my $systemPath; my $nixosPath; my $ensureUniqueName = 0; my $autoStart = 0; +my $bridge; my $extraConfig; my $signal; my $configFile; @@ -44,6 +45,7 @@ GetOptions( "help" => sub { showHelp() }, "ensure-unique-name" => \$ensureUniqueName, "auto-start" => \$autoStart, + "bridge=s" => \$bridge, "system-path=s" => \$systemPath, "signal=s" => \$signal, "nixos-path=s" => \$nixosPath, @@ -153,6 +155,7 @@ if ($action eq "create") { push @conf, "PRIVATE_NETWORK=1\n"; push @conf, "HOST_ADDRESS=$hostAddress\n"; push @conf, "LOCAL_ADDRESS=$localAddress\n"; + push @conf, "HOST_BRIDGE=$bridge\n"; push @conf, "AUTO_START=$autoStart\n"; write_file($confFile, \@conf); |