Re:How to Learn Nix
by enricozb on Monday November 22, 2021 @03:53AM
(#29304270)
Does anyone else not use any of the ad hoc package management with Nix? I exclusively use a declarative `config.nix`, with `sudo nixos-rebuild switch` every time I want to install a package.
[ Parent
| on HN ]
Re:How to Learn Nix
by Throwaway194902 on Monday November 22, 2021 @03:59AM
(#29304319)
I extensively use nix-shell if that falls under ad-hoc package management. Together with lorri[0], I can place a `shell.nix` in my project repository and when cd'ing into the folder, I will be dropped in a shell with all project specific dependencies available to me.
This is what I do. If I need an ad hoc environment, I use `nix shell`, or I set up a flake for the project and have `direnv` activate it when I `cd` into the project directory or open the folder in VS Code.
Mostly yes. I’ve had a couple of repo-specific shells and some utils installed via nix-env -iA.
Do you find it works well for you?
I think that a lot of my pain points with Nix comes from not “doing things the Nix way”.
nix-env -iA is pretty much deprecated at this point. It was seen as an easy on ramp but in reality it caused confusion and created more issues.