File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,21 @@ function add_path --argument-names new_path
2121end
2222
2323# Main configuration
24+
25+ # Set up the per-user profile.
26+
27+ set NIX_LINK $HOME/.nix-profile
28+
29+ # Set up environment.
30+ # This part should be kept in sync with nixpkgs:nixos/modules/programs/environment.nix
2431set --export NIX_PROFILES "@localstatedir@/nix/profiles/default $HOME/.nix-profile"
2532
2633# Populate bash completions, .desktop files, etc
2734if test -z "$XDG_DATA_DIRS"
2835 # According to XDG spec the default is /usr/local/share:/usr/share, don't set something that prevents that default
29- set --export XDG_DATA_DIRS "/usr/local/share:/usr/share:/nix/var/nix/profiles/default/share"
36+ set --export XDG_DATA_DIRS "/usr/local/share:/usr/share:$NIX_LINK/share: /nix/var/nix/profiles/default/share"
3037else
31- set --export XDG_DATA_DIRS "$XDG_DATA_DIRS:/nix/var/nix/profiles/default/share"
38+ set --export XDG_DATA_DIRS "$XDG_DATA_DIRS:$NIX_LINK/share: /nix/var/nix/profiles/default/share"
3239end
3340
3441# Set $NIX_SSL_CERT_FILE so that Nixpkgs applications like curl work.
5663end
5764
5865add_path "@localstatedir@/nix/profiles/default/bin"
59- add_path "$HOME/.nix-profile/bin"
66+ add_path "$NIX_LINK/bin"
67+ set --erase NIX_LINK
6068
6169# Cleanup
6270
You can’t perform that action at this time.
0 commit comments