aboutsummaryrefslogtreecommitdiff
path: root/scripts/nix-profile.fish.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-profile.fish.in')
-rw-r--r--scripts/nix-profile.fish.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/nix-profile.fish.in b/scripts/nix-profile.fish.in
index 731498c76..619df52b8 100644
--- a/scripts/nix-profile.fish.in
+++ b/scripts/nix-profile.fish.in
@@ -20,6 +20,14 @@ if test -n "$HOME" && test -n "$USER"
# This part should be kept in sync with nixpkgs:nixos/modules/programs/environment.nix
set --export NIX_PROFILES "@localstatedir@/nix/profiles/default $HOME/.nix-profile"
+ # Populate bash completions, .desktop files, etc
+ if test -z "$XDG_DATA_DIRS"
+ # According to XDG spec the default is /usr/local/share:/usr/share, don't set something that prevents that default
+ set --export XDG_DATA_DIRS "/usr/local/share:/usr/share:$NIX_LINK/share:/nix/var/nix/profiles/default/share"
+ else
+ set --export XDG_DATA_DIRS "$XDG_DATA_DIRS:$NIX_LINK/share:/nix/var/nix/profiles/default/share"
+ end
+
# Set $NIX_SSL_CERT_FILE so that Nixpkgs applications like curl work.
if test -n "$NIX_SSH_CERT_FILE"
: # Allow users to override the NIX_SSL_CERT_FILE