aboutsummaryrefslogtreecommitdiff
path: root/scripts/nix-profile-daemon.fish.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-profile-daemon.fish.in')
-rw-r--r--scripts/nix-profile-daemon.fish.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/nix-profile-daemon.fish.in b/scripts/nix-profile-daemon.fish.in
index 400696812..c23aa64f0 100644
--- a/scripts/nix-profile-daemon.fish.in
+++ b/scripts/nix-profile-daemon.fish.in
@@ -19,6 +19,14 @@ set __ETC_PROFILE_NIX_SOURCED 1
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/var/nix/profiles/default/share"
+else
+ set --export XDG_DATA_DIRS "$XDG_DATA_DIRS:/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