1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00

nix-profile.fish: set --local NIX_LINK

Using `set --local` is better than using `set`/`set --erase`.  `--local`
will preserve any existing `NIX_LINK` value.  And the local variable is
automatically removed for any execution path.
This commit is contained in:
Illia Bobyr 2025-01-13 19:12:24 -08:00
parent 3e8cd2ffe6
commit 50300772e4
No known key found for this signature in database
GPG key ID: 4D72E6A090EB3E9E
2 changed files with 2 additions and 4 deletions

View file

@ -24,7 +24,7 @@ end
# Set up the per-user profile.
set NIX_LINK $HOME/.nix-profile
set --local NIX_LINK $HOME/.nix-profile
# Set up environment.
# This part should be kept in sync with nixpkgs:nixos/modules/programs/environment.nix
@ -63,7 +63,6 @@ if set --query MANPATH
end
add_path "$NIX_LINK/bin"
set --erase NIX_LINK
# Cleanup