Add option to use a custom nix install URL (#195)

This change allow users to specify a custom nix install URL to use
another nix version than the latest stable or to use another
installer script.
This commit is contained in:
Jean-François Roche 2024-03-11 16:40:15 +01:00 committed by GitHub
parent 45e2361a9e
commit 69819871dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -325,8 +325,8 @@ infect() {
# TODO use addgroup and adduser as fallbacks
#addgroup nixbld -g 30000 || true
#for i in {1..10}; do adduser -DH -G nixbld nixbld$i || true; done
curl -L https://nixos.org/nix/install | sh -s -- --no-channel-add
NIX_INSTALL_URL="${NIX_INSTALL_URL:-https://nixos.org/nix/install}"
curl -L "${NIX_INSTALL_URL}" | sh -s -- --no-channel-add
# shellcheck disable=SC1090
source ~/.nix-profile/etc/profile.d/nix.sh