Skip to content

Commit

Permalink
Merge pull request #7921 from NixOS/backport-7920-to-2.14-maintenance
Browse files Browse the repository at this point in the history
[Backport 2.14-maintenance] nix-profile{,-daemon}.sh.in: Allow XDG_STATE_HOME to be unset
  • Loading branch information
edolstra authored Mar 1, 2023
2 parents 892b699 + 9ccd835 commit 70d01bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/nix-profile-daemon.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if [ -n "${__ETC_PROFILE_NIX_SOURCED:-}" ]; then return; fi
__ETC_PROFILE_NIX_SOURCED=1

NIX_LINK=$HOME/.nix-profile
if [ -n "$XDG_STATE_HOME" ]; then
if [ -n "${XDG_STATE_HOME-}" ]; then
NIX_LINK_NEW="$XDG_STATE_HOME/nix/profile"
else
NIX_LINK_NEW=$HOME/.local/state/nix/profile
Expand Down
2 changes: 1 addition & 1 deletion scripts/nix-profile.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
# Set up the per-user profile.

NIX_LINK="$HOME/.nix-profile"
if [ -n "$XDG_STATE_HOME" ]; then
if [ -n "${XDG_STATE_HOME-}" ]; then
NIX_LINK_NEW="$XDG_STATE_HOME/nix/profile"
else
NIX_LINK_NEW="$HOME/.local/state/nix/profile"
Expand Down

0 comments on commit 70d01bd

Please sign in to comment.