aboutsummaryrefslogtreecommitdiff
path: root/scripts/nix-profile.fish.in
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 05:44:33 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 05:46:35 +0100
commite3bf28818000a27364241b3a6b0fdd85a2332f1c (patch)
tree19828db7cb3fcbb802a4a0f27f9233dd3883429d /scripts/nix-profile.fish.in
parent1b135e6e7b45acd135653bfe8b9dd7bf7178ca6c (diff)
Update scripts/nix-profile-daemon.fish.in
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> (cherry picked from commits 867f894289437a96630579592a46a4253151f079, 896013ec0c0d4633349ff0373bdae626667adc77, 150b5aba509d169a50c6ad62100c3ad7bf00242b, 1362a0a55aaddccef5a525e3b1179239d650bb07) Change-Id: I0ba6a399d22cc5e927d9ef7046cc6f95856c1559
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