nix.dev icon indicating copy to clipboard operation
nix.dev copied to clipboard

Nix install commands are (practically) incorrect

Open winterqt opened this issue 8 months ago • 7 comments

Observations

The Nix install commands within the installation documentation (curl -L https://nixos.org/nix/install | sh -s -- --daemon) make it so that the installer always runs headlessly.

Problem

Especially for a new user, losing the verboseness of the questions the script asks is definitely an issue.

Approaches

We went through this dance once before, see https://github.com/NixOS/nix/issues/5238 and https://github.com/NixOS/nix/pull/5395. How did we get back to using the pipe?

Willing to help?

Sure, I would just appreciate context as to how exactly we ended up back to using the pipe, which definitely isn't ideal.

Priorities

Add :+1: to issues you find important.

winterqt avatar May 08 '25 22:05 winterqt

Aha, seems I was unaware of the original dance back when someone came around and said "but the process substitution syntax doesn't work on fish".

So I'm fine with just having a bunch of tabs for different operating systems and shells, but can we have a single source of truth for that?

fricklerhandwerk avatar May 09 '25 06:05 fricklerhandwerk

What kind of source would you prefer? Ideally this won’t be an issue for too long anyways as the experimental Rust installer completely alleviates the need for this. 😅

winterqt avatar May 09 '25 06:05 winterqt

Basically I only imagine changing the POSIX-y shell one and adding a new one for Fish, nothing more. I don’t think we’ll really need any more than that, anyone using a more esoteric shell can figure it out on their own based on the examples. 😉

winterqt avatar May 09 '25 06:05 winterqt

this won’t be an issue for too long

Famous last words. :P

What kind of source would you prefer?

One that is easy to find for users and easy to maintain in sync with the ground truth. No fixed opinion here, and I'm oscillating between the three options where we currently have that information hard-copied (nix.dev, nixos.org, Nix reference manual).

fricklerhandwerk avatar May 09 '25 06:05 fricklerhandwerk

Oh god right it’s still on nixos.org… and in the reference manual?! The Nix README links to nix.dev now, I thought they just removed it from their manual. Ugh. >_>

winterqt avatar May 09 '25 07:05 winterqt

But yeah I’m still not 100% sure what you’re imagining here.

Would it be best if we put it in the reference manual as the source of truth? Issue with that is that updates take a while to propagate as they have to propagate with a release… maybe the installer’s (subdirectory) README?

winterqt avatar May 09 '25 07:05 winterqt

TBH I don't know. We didn't remove it from the Nix manual because it wasn't clear if it's a good idea. And we didn't remove it from nixos.org because my proposal to do so was rejected by the marketing team -- which is fair, having installation instructions front and center is desirable.

The problem with transcluding content from a different repository (which I read from your suggestion to put things into a README in the Nix repo) has the risk of silently breaking downstream consumers (e.g. if we spliced the contents of that README into nixos.org or nix.dev). Markdown accepts all strings, so there's not even a way to guard against updating into a broken version.

Feel free to dump more ideas how to fix this. I'll also give it more thoughts. Ping me if I lose track of it, it's not my top priority right now.

Related:

  • https://github.com/NixOS/nix.dev/issues/424

fricklerhandwerk avatar May 09 '25 14:05 fricklerhandwerk