mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 07:16:17 +02:00
nix-profile{,-daemon}.sh.in: Allow XDG_STATE_HOME to be unset
One of our CI machines installs Nix via the official script and then sources the nix-profile.sh script to setup the environment. However, it doesn't have XDG_STATE_HOME set, which causes sourcing the script to fail.
This commit is contained in:
parent
4489def1b3
commit
24eaa086f0
2 changed files with 2 additions and 2 deletions
|
@ -3,7 +3,7 @@ if [ -n "${__ETC_PROFILE_NIX_SOURCED:-}" ]; then return; fi
|
||||||
__ETC_PROFILE_NIX_SOURCED=1
|
__ETC_PROFILE_NIX_SOURCED=1
|
||||||
|
|
||||||
NIX_LINK=$HOME/.nix-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"
|
NIX_LINK_NEW="$XDG_STATE_HOME/nix/profile"
|
||||||
else
|
else
|
||||||
NIX_LINK_NEW=$HOME/.local/state/nix/profile
|
NIX_LINK_NEW=$HOME/.local/state/nix/profile
|
||||||
|
|
|
@ -3,7 +3,7 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
|
||||||
# Set up the per-user profile.
|
# Set up the per-user profile.
|
||||||
|
|
||||||
NIX_LINK="$HOME/.nix-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"
|
NIX_LINK_NEW="$XDG_STATE_HOME/nix/profile"
|
||||||
else
|
else
|
||||||
NIX_LINK_NEW="$HOME/.local/state/nix/profile"
|
NIX_LINK_NEW="$HOME/.local/state/nix/profile"
|
||||||
|
|
Loading…
Reference in a new issue