aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/globals.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index 31dfe5b4e..07f524858 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -995,6 +995,18 @@ public:
| `~/.nix-profile` | `$XDG_STATE_HOME/nix/profile` |
| `~/.nix-defexpr` | `$XDG_STATE_HOME/nix/defexpr` |
| `~/.nix-channels` | `$XDG_STATE_HOME/nix/channels` |
+
+ If you already have Nix installed and are using [profiles](@docroot@/package-management/profiles.md) or [channels](@docroot@/package-management/channels.md), you should migrate manually when you enable this option.
+ If `$XDG_STATE_HOME` is not set, use `$HOME/.local/state/nix` instead of `$XDG_STATE_HOME/nix`.
+ This can be achieved with the following shell commands:
+
+ ```sh
+ nix_state_home=${XDG_STATE_HOME-$HOME/.local/state}/nix
+ mkdir -p $nix_state_home
+ mv $HOME/.nix-profile $nix_state_home/profile
+ mv $HOME/.nix-defexpr $nix_state_home/defexpr
+ mv $HOME/.nix-channels $nix_state_home/channels
+ ```
)"
};
};