diff --git a/scripts/setup b/scripts/setup index 9989ae1ac8..31fadcdd60 100755 --- a/scripts/setup +++ b/scripts/setup @@ -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