Unattended install

Hi, when I run the installer as documented in Nix - Getting Nix / NixOS I get an explanation of what the installer will do and then it asks for interactive confirmation.
How do I run an unattended install?
I tried sh <(curl -L https://nixos.org/nix/install) --help but I don’t see any flags about this.

Many thanks

1 Like

The installation script will run unattended if stdin is not connected to a tty. Example: sh <(curl -L https://nixos.org/nix/install) < /dev/null ...installer flags...

1 Like

Adding a bit of explanations :slight_smile:

In the case of sh <(curl -L https://nixos.org/nix/install) , the part <(curl -L https://nixos.org/nix/install) is resolved as a temporary file with the content generated from curl -L https://nixos.org/nix/install

so it ends up running sh /some/temp/file, which is interactive.

1 Like