1
0
Fork 0
mirror of https://github.com/NixOS/nix.dev.git synced 2024-10-18 14:32:43 -04:00

Use a pipe for all install commands

This commit is contained in:
David Dunn 2022-12-28 09:36:27 +04:00
parent 4965408021
commit be05bdef94
No known key found for this signature in database
GPG key ID: 99F10972153A72B0

View file

@ -7,67 +7,43 @@
Install Nix via the recommended [multi-user installation]:
```shell-session
$ sh <(curl -L https://nixos.org/nix/install) --daemon
$ curl -L https://nixos.org/nix/install | sh -s -- --daemon
```
:::{note}
For security you may want to [verify the installation script] using GPG signatures.
:::
:::{note}
If using [fish shell](https://fishshell.com/) there is different syntax for process substitution:
```fish
$ sh (curl -L https://nixos.org/nix/install | psub) --daemon
```
:::
## macOS
Install Nix via the recommended [multi-user installation]:
```shell-session
$ sh <(curl -L https://nixos.org/nix/install)
$ curl -L https://nixos.org/nix/install | sh
```
:::{note}
For security you may want to [verify the installation script] using GPG signatures.
:::
:::{note}
If using [fish shell](https://fishshell.com/) there is different syntax for process substitution:
```fish
$ sh (curl -L https://nixos.org/nix/install | psub)
```
:::
## Windows (WSL2)
Install Nix via the recommended [single-user installation]:
```shell-session
$ sh <(curl -L https://nixos.org/nix/install) --no-daemon
$ curl -L https://nixos.org/nix/install | sh -s -- --no-daemon
```
However, if you have [systemd support] enabled, install Nix via the recommended [multi-user installation]:
```shell-session
$ sh <(curl -L https://nixos.org/nix/install) --daemon
$ curl -L https://nixos.org/nix/install | sh -s -- --daemon
```
:::{note}
For security you may want to [verify the installation script] using GPG signatures.
:::
:::{note}
If using [fish shell](https://fishshell.com/) there is different syntax for process substitution:
```fish
$ sh (curl -L https://nixos.org/nix/install | psub) --daemon
```
:::
[systemd support]: https://learn.microsoft.com/en-us/windows/wsl/wsl-config#systemd-support
## Docker