Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Tangentially related but I wish people would stop recommending nix-env and just in general ad-hoc installation on using Nix. It defeats the purpose of using Nix in the first place. If you want to try a package out, there’s "nix shell" or "nix-shell -p" if you’re not using flakes. If you want to install a package you should put it in your configuration instead.


You mean pretty much the very first thing that the Nix Manual suggest in the Quick Start:

https://nixos.org/manual/nix/stable/quick-start.html

and then later again in the Basic Package Management section:

https://nixos.org/manual/nix/stable/package-management/basic...

I fully agree that it is using Nix in the wrong way. But if it's something that Nix's own manual suggest, you can't blame people for doing the same.


I have all of my config in a flake, but I think both are fine. Not everyone will use Nix the same way. And it’s easy to see a progression path from using Nix with package installation from nix-env, to flakes, to NixOS. Some people might stop along that journey, but Nix might not have been a good fit for their usecase then anyways. It’s already way too hard to break into the ecosystem, no reason to make it harder.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: