5 ms·
> When I do try Nix people say “oh don’t do it that way, even though that’s what the docs say, now the way to do it is this new way.” What were you trying to d
by rgoulter 4y ago
> When I do try Nix people say “oh don’t do it that way, even though that’s what the docs say, now the way to do it is this new way.”
What were you trying to do such that the way the docs said to do it was wrong?
- dizhn 4y agoEven simple things like how to install a package.
- otabdeveloper4 4y agoMost people who use Nix don't ever "install packages". It's a very niche and weird thing to want to do, so yes, you won't find good documentation.
- dizhn 4y agohttps://nixos.org/manual/nix/stable/introduction.html https://nixos.org/manual/nix/stable/introduction.html "package manager" is literally in the first sentence.
- rgoulter 4y agoRight. Installing packages isn't a niche or weird thing in any way. Nix does have equivalents to "apt install <package>", etc... but, it's prone to "I forgot I did that / I didn't know I did that", and problems arising from that. (Other distribution package managers like apt-get or pacman require installing packages as root; but with nix packages should be installed as non-root. And the nix command to update installed packages isn't intuitive). What's typically encouraged is to instead install packages as part of the NixOS configuration, or as part of a home-manager configuration. Or, just using commands like "nix shell nixpkgs#<package>", which just adds the program to the path in the current shell, without installing it. (Which is a neat feature of nix).
- qbasic_forever 4y agoArguably anything in the docs that say "Run nix-env ..." is wrong, or at least not the flakes way of doing things. It would be much more clear if the docs just came out and said "nix-env is deprecated, move to flakes, here's where to read the flakes way to do things".