News for hackers. Stuff that matters.
Re:Some Notes on Using Nix by rgoulter on Wednesday March 01, 2023 @11:31PM (#34992043)
The reason nix-env is strongly discouraged is because it leads to a disproportionate number of people asking for help. Some discussion here: https://discourse.nixos.org/t/depreciate-the-use-of-nix-env-...

I'd put that down to because you either didn't understand the consequences of running the command, or forgot you ran the command and so later on when things go weird, it causes confusion. -- e.g. for me, I initially had run `# nix-env -iA nixpkgs.firefox`; later, I was confused why firefox was installed, even though it wasn't installed in my profile at all.

I think the risks of `nix-env -i` are overstated, and over-repeated without explanation. Albeit, it is foot-gun-ish enough that it's worth at least echoing "nix community frowns upon its usage".

There are no comments on this comment yet.