diff --git a/lix/nix/upgrade-nix.cc b/lix/nix/upgrade-nix.cc index 6617b4818..cc3384f4a 100644 --- a/lix/nix/upgrade-nix.cc +++ b/lix/nix/upgrade-nix.cc @@ -141,6 +141,8 @@ struct CmdUpgradeNix : MixDryRun, EvalCommand // install the new one, in case the new and old versions aren't considered // to be "the same package" by nix-env's logic (e.g., if their pnames differ). Strings removeArgs = { + "--store", + "local", "--uninstall", oldNixEnv, "--profile", @@ -150,6 +152,8 @@ struct CmdUpgradeNix : MixDryRun, EvalCommand aio().blockOn(runProgram(newNixEnv, false, removeArgs)); Strings upgradeArgs = { + "--store", + "local", "--profile", this->profileDir, "--install", diff --git a/misc/upgrade-lix.sh b/misc/upgrade-lix.sh index 664e919ae..34689eed3 100755 --- a/misc/upgrade-lix.sh +++ b/misc/upgrade-lix.sh @@ -124,9 +124,12 @@ checkSystemdService set -x exec "$NIX" run \ + --store local \ --extra-experimental-features "nix-command flakes" \ "${SUBSTITUTER_ARGS[@]}" \ "${LIX_BASE}?ref=${LIX_REF}" \ + -- \ + --store local \ --extra-experimental-features "nix-command flakes" \ upgrade-nix \ "${SUBSTITUTER_ARGS[@]}"