aboutsummaryrefslogtreecommitdiff
path: root/scripts/nix-profile-daemon.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/nix-profile-daemon.sh.in')
-rw-r--r--scripts/nix-profile-daemon.sh.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/nix-profile-daemon.sh.in b/scripts/nix-profile-daemon.sh.in
index 8cfd3149e..c63db4648 100644
--- a/scripts/nix-profile-daemon.sh.in
+++ b/scripts/nix-profile-daemon.sh.in
@@ -30,6 +30,14 @@ fi
export NIX_PROFILES="@localstatedir@/nix/profiles/default $NIX_LINK"
+# Populate bash completions, .desktop files, etc
+if [ -z "$XDG_DATA_DIRS" ]; then
+ # According to XDG spec the default is /usr/local/share:/usr/share, don't set something that prevents that default
+ export XDG_DATA_DIRS="/usr/local/share:/usr/share:$NIX_LINK/share:/nix/var/nix/profiles/default/share"
+else
+ export XDG_DATA_DIRS="$XDG_DATA_DIRS:$NIX_LINK/share:/nix/var/nix/profiles/default/share"
+fi
+
# Set $NIX_SSL_CERT_FILE so that Nixpkgs applications like curl work.
if [ -n "${NIX_SSL_CERT_FILE:-}" ]; then
: # Allow users to override the NIX_SSL_CERT_FILE