aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorQyriad <qyriad@qyriad.me>2024-04-27 17:28:56 -0600
committerQyriad <qyriad@qyriad.me>2024-04-29 01:19:21 +0000
commitaae12f5848d930abbf938f480f9851e77a234505 (patch)
treeadf9273c00b7ee108a318264bf1447b0c455fffe /doc
parent2bd57d4d36f66de00fa4f791569056e58598e782 (diff)
fix `nix upgrade-nix` on new-style profiles
nix3-profile automatically migrates any profile its used on to its style of profile -- the ones with manifest.json instead of manifest.nix. On non-NixOS systems, Nix is conventionally installed to the profile at /nix/var/nix/profiles/default, so if a user passed that to `--profile` of `nix profile`, then it would break upgrade-nix from ever working again, without recreating the profile. This commit fixes that, and allows upgrade-nix to work on either kind of profile. Fixes #16. Change-Id: I4c49b1beba93bb50e8f8a107edc451affe08c3f7
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/rl-next/upgrade-nix-profile-compat.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/manual/rl-next/upgrade-nix-profile-compat.md b/doc/manual/rl-next/upgrade-nix-profile-compat.md
new file mode 100644
index 000000000..df9879c6f
--- /dev/null
+++ b/doc/manual/rl-next/upgrade-nix-profile-compat.md
@@ -0,0 +1,8 @@
+---
+synopsis: using `nix profile` on `/nix/var/nix/profiles/default` no longer breaks `nix upgrade-nix`
+cls: 952
+---
+
+On non-NixOS, Nix is conventionally installed into a `nix-env` style profile at /nix/var/nix/profiles/default.
+Like any `nix-env` profile, using `nix profile` on it automatically migrates it to a `nix profile` style profile, which is incompatible with `nix-env`.
+`nix upgrade-nix` previously relied solely on `nix-env` to do the upgrade, but now will work fine with either kind of profile.