Only overwrite container-configuration when --config is specified.

Fixes #2834.
This commit is contained in:
Moritz Ulrich 2014-06-05 18:38:38 +02:00
parent d5afbf8235
commit f6d03359b3

View file

@ -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", "<nixpkgs/nixos>",