4 ms·
> I saw talk from one guy who wanted to make the Nix package manager use commands that were more like in other package managers. I'm guessing this is about `ni
by Shoue 6y ago
> I saw talk from one guy who wanted to make the Nix package manager use commands that were more like in other package managers.
I'm guessing this is about `nix` and `nix-env` having poor interfaces and lacking e.g `nix install` – those aren't _really_ meant to do package management, because it's an imperative approach akin to Apt. I haven't touched `nix-env` for actual package management in over a year now.
You should instead be writing your system-level package dependencies and services in your configuration.nix, your user-level package dependencies and services in home-manager's home.nix, and if you just need to use a package quickly, you should use `nix run nixpkgs.hello -c hello` or `nix-shell -p hello`, and if you're trying to set up a dev env for a project you should be using direnv or lorri. nix-env pollutes your environment and causes headaches when/if you add the same packages you have installed there to your declarative files.
>I couldn't use any of my NPM skills with the Nix package manager.
You can – look into direnv and lorri, they let you handle system-level dependencies while NPM handles its own libraries, on a per-project basis. This is IMO the best contemporary way to do a developer environment.
- k__ 6y agoSure, but a small CLI tool that adds and removes packages in these files would probably go a long way.