Was a redirect just introduced on the install script's url?

We’re using a GitHub action for installing nix as part of our CI, and that action started mysteriously failing about an hour or so ago. I dug through the source code and found that it calls sh <(curl https://nixos.org/nix/install) --daemon, which suddenly started failing because Redirecting: not found. I thought I’d better try that curl command myself, and:

$ curl https://nixos.org/nix/install
Redirecting to https://channels.nixos.org/nix-latest/install

I can imagine this change has caused a load of people to hit this same issue since curl doesn’t follow redirects by default (Redirects - Everything curl)

1 Like

We’re in the process of migrating nixos.org to Netlify. As part of this migration, all Nix releases have been moved to releases.nixos.org. However, we’ll probably change /nix/install back to a regular file temporarily to prevent breakage.

BTW you should never use https://nixos.org/nix/install in automated scripts because Nix could change in incompatible ways in the future. It’s better to use a versioned install script (e.g. https://releases.nixos.org/nix/nix-2.3.3/install).

Thanks. That’s a good shout, I definitely agree. We’ve only started using GitHub Actions in the last few days, and are using this as an opportunity to switch over to nix for building and testing as much as possible. I’ll submit a PR to that repo to support using versioned scripts.