Example of using nix for managing user environment packages
Uses:
- [niv][https://github.com/nmattia/niv] to manage dependencies for nix projects.
- [NUR][https://github.com/nix-community/NUR] to pull in extra user packages that are not part of the nixpkgs repo.
To quickly use this, add a package to common.nix
:
with import ./nix {};
[
cowsay
]
Now install packages:
nix-env -i -f default.nix --remove-all
Now packages should be available in shell:
$ fortune
The only way to amuse some people is to slip and fall on an icy pavement.
This depends on how each package reads their configuration.
e.g. for neovim, we can simply specify the configuration via override
. See common.nix
.
- Home Manager (personally haven't used it). However, it seems like a heavyweight solution versus just specifying the config for each package individually.
- [] add common patterns for importing (e.g. nur, directly from repo from niv, from package repos similar to pypi npm etc.)