docs: avoid bash-specific process substitution in install command#1980
docs: avoid bash-specific process substitution in install command#1980Z-char wants to merge 3 commits into
Conversation
Avoid bash-specific process substitution in install command.
|
Hi, I have some gripes I want to address here:
Would be cool if you could address these points :) |
| On Arch Linux, you can alternatively [install Nix through `pacman`](https://wiki.archlinux.org/title/Nix#Installation). | ||
|
|
||
| On Fedora, you can [install Nix via `dnf`](https://src.fedoraproject.org/rpms/nix). | ||
|
|
There was a problem hiding this comment.
I would not like to have this in here by now as it may seem official to some people and will put load on people that are not responsible for these forms of packaging
There was a problem hiding this comment.
I would not like to have this in here by now as it may seem official to some people and will put load on people that are not responsible for these forms of packaging
Maybe we can think about introducing a clearly marked unofficial packaging section
|
|
||
| ```bash prompt | ||
| $ sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon | ||
| $ curl -L https://nixos.org/nix/install | sh -s -- --daemon |
There was a problem hiding this comment.
| $ curl -L https://nixos.org/nix/install | sh -s -- --daemon | |
| $ curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --daemon |
this goes for the rest of commands
There was a problem hiding this comment.
@fricklerhandwerk is there any reason nix.dev dropped these flags?
There was a problem hiding this comment.
Keeping the flags makes the command more explicit, which I think is helpful.
Although this may not fully align with the nix.dev script, I'll add the flags back for now until there's a unified recommendation across documentation.
We might need to solve NixOS/nix.dev#424 somehow.
There was a problem hiding this comment.
These (all) variants should be kept in sync. --proto '=https' seems most valuable keeping everywhere to prevent from malicious redirects.
|
@thilobillerbeck On external packaging, a couple of years back I had the exact same stance. That was a time where those installations didn't work reliably and we even had the occasional complaint/support request we couldn't meaningfully address. The NGI team solved that problem by running integration tests against installers known to work. So these days we know these are not broken, it's not a willy-nilly random pick of installation paths. I suggest leaving them. Ideally we'd have an authoritative solution of course. On the technical side, arguably we only need @imincik or @eljamm to sit down with you and @hsjobeki to clarify a few things, and then port that stuff to here or nix.dev... We may or may not be able to organise this somewhat quickly, but there's an escalation path to SC/board now. And those would help for the social part: setting up lines of communication to maintainers of the other distros that ship Nix, so we can ask each other questions in case either side runs into problems. Afte so many years, these issues can now be addressed properly. In principle... |
|
Weighting up leaving the flags in or quickly coming up with a long term solution I guess leaving the flags in obviously wins. :D |
|
Just removed the distro specific part myself, @hsjobeki could you re-review your suggested changes are addressed now so this PR gets unblocked? |
The previous install command used process substitution:
$ sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemonProcess substitution (<(...)) is not supported by all shells and is not part of the POSIX shell specification. This can cause the command to fail for users running the instructions in environments where the default shell does not implement this feature.
To make the command more portable, replace it with the pipe-based form used in the official nix.dev documentation:
$ curl -L https://nixos.org/nix/install | sh -s -- --daemonI believe this will also fixes #1976 .