Don't ever try to install Nix on NixOS
This commit is contained in:
parent
3469c4a9b1
commit
69b9847c5f
|
@ -19,7 +19,10 @@ exit_unless_os_supported
|
|||
####
|
||||
setup_header "Checking prerequisites..."
|
||||
|
||||
if ! program_exists "curl"; then
|
||||
_need_curl=0
|
||||
! is_nixos && ! program_exists nix && _need_curl=1
|
||||
|
||||
if _need_curl && ! program_exists "curl"; then
|
||||
cecho "@b@yellow[[Please install curl before running setup.]]"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -45,7 +48,7 @@ fi
|
|||
####
|
||||
setup_header "Installing requirements..."
|
||||
|
||||
if ! program_exists nix; then
|
||||
if [ "$IN_NIX_SHELL" != 'pure' ] && ! is_nixos && ! program_exists nix; then
|
||||
required_version=$(toolversion nix)
|
||||
NIX_INSTALLER_NO_MODIFY_PROFILE=1 bash <(curl https://nixos.org/releases/nix/nix-${required_version}/install) --no-daemon
|
||||
if [ $? -eq 0 ]; then
|
||||
|
|
Loading…
Reference in New Issue