From f6d03359b3810dca112e1190eeec7f18a3bab247 Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Thu, 5 Jun 2014 18:38:38 +0200 Subject: [PATCH] Only overwrite container-configuration when --config is specified. Fixes #2834. --- nixos/modules/virtualisation/nixos-container.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/virtualisation/nixos-container.pl b/nixos/modules/virtualisation/nixos-container.pl index 718630fe8b9b..5083abd84489 100644 --- a/nixos/modules/virtualisation/nixos-container.pl +++ b/nixos/modules/virtualisation/nixos-container.pl @@ -31,7 +31,7 @@ EOF } my $ensureUniqueName = 0; -my $extraConfig = ""; +my $extraConfig; GetOptions( "help" => sub { showHelp() }, @@ -190,7 +190,7 @@ elsif ($action eq "update") { # FIXME: may want to be more careful about clobbering the existing # configuration.nix. - writeNixOSConfig $nixosConfigFile if defined $extraConfig; + writeNixOSConfig $nixosConfigFile if (defined $extraConfig && $extraConfig ne ""); system("nix-env", "-p", "$profileDir/system", "-I", "nixos-config=$nixosConfigFile", "-f", "",