3 ms·
Don’t forget the documentation! “getting started” bugs that outright breaks your install if you actually try to follow them; WONTFIX, you should just know how t
by misnome 3y ago
Don’t forget the documentation! “getting started” bugs that outright breaks your install if you actually try to follow them; WONTFIX, you should just know how to do it.
- pxc 3y agoI've seen you post about this before, I think, and I am curious about the details. How did you install Nix and what were the sections of the manual that broke things for you? > WONTFIX Link to GitHub issue, please?
- misnome 3y agohttps://github.com/NixOS/nix/issues/1396 https://github.com/NixOS/nix/issues/1396 “Working as intended” Last time I checked (~year ago) this wordage was still on the documentation page; someone seems to have hit in January. It seems to be missing now though. Six years with a basic “run this and your path through the documentation stops” issue IMO is a project not worth my time; they clearly don’t want new users.
- pxc 3y agoYeah this is a documentation footgun for some¹ users, and unfortunately is more likely to hit new users and dabblers than the experienced or dedicated Nix users who can just step over it. It sucks. It's true that the information in that section² of the manual is correct, and also true that those snippets are not instructions, so the manual is not instructing anyone to do a thing that will break their computer... but if some Nix profile is the only thing putting Nix on your PATH and you switch away from that profile, you will naturally no longer have Nix on your PATH, and the next Nix command you try to run will fail. The docs should warn you about that in this section, and the application should also warn you on any actions that might leave your PATH Nixless like this. There's another problem here, I think only hinted at in that GitHub issue, in that if you switch to an empty or nonexistent profile and start a new shell, the `/bin` path in your profile won't be added to your shell's PATH on shell startup because it doesn't exist. And then when you do install something to that profile, it won't be on your PATH until you start a new shell. The issue you filed should be reopened as a documentation bug, and a new issue should be created about warning users on operations that might render their PATHs Nixless. If anyone does hit this or something similar: you can just run nix-env or any other Nix binaries directly from the Nix store, or from one of the other still-existing profile links under /nix/var/nix/profiles, e.g. /nix/var/nix/profiles/per-user/$USER/bin/nix-env, to switch your profile back. -- 1: Namely, Nix users whose Nix binaries are provided in a per-user profile and are running Nix as the relevant users. NixOS users, Nix-Darwin users, System Manager users, users of regular old multi-user Nix installs, and users who install Nix itself via their distro's package manager aren't affected. 2: https://nixos.org/manual/nix/stable/package-management/profiles.html?highlight=switch#profiles https://nixos.org/manual/nix/stable/package-management/profi...