Fix nix installer up

This commit is contained in:
Andrew R. M 2025-05-20 18:45:04 +00:00 committed by anmiller
parent 4a461eb974
commit da7a244f95

View File

@ -9,6 +9,10 @@ set -x
# Abort installation if Nix is already installed # Abort installation if Nix is already installed
if [ -d /nix/store ]; then if [ -d /nix/store ]; then
exit 0 exit 0
elif ! [ -O /nix ]; then
# If we don't own /nix use sudo to chown it.
# If we can't sudo then nothing we do here will work so we just let this fail
sudo chown $UID /nix
fi fi
# Workaround to make a single user install work as root # Workaround to make a single user install work as root