aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorAlexander Bantyev <balsoft@balsoft.ru>2023-06-02 15:38:17 +0000
committerGitHub <noreply@github.com>2023-06-02 15:38:17 +0000
commita15b2c01c0bac226ed34d8ba7e10a563c4a54890 (patch)
tree96caf1204fbbf3a85942ff1e1481582cd41e3f33 /src/libstore
parent527eb4a99a1901de17aec9833f7076ad7729656e (diff)
Document manual migration for use-xdg-base-directories (#8044)
* Document manual migration for use-xdg-base-directories As there's currently no automatic migration for use-xdg-base-directories option, add instructions for manual migration to the option's description. Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
Diffstat (limited to 'src/libstore')
-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
+ ```
)"
};
};