⟰ Some NixOS Notes
⟸ Packages and Derivations

Supplementary Notes

home-manager for User Configuration

home-manager
Home Manager Manual

home-manager provides a set of modules for managing user-specific packages and configuration. It can be installed as a NixOS module to be integrated into the normal system configuration, or by the user to be configured independently.

nix-env Considered Harmful

nix-env manipulates user environments, which are sets of packages currently available to the user.

Each generation of a user environment is no less reproducible than any other system configuration. However, the experience of using nix-env feels to me like a devolution to the ad-hoc package management found in the package managers for any other distro: it makes packages passively available in your environment without an obvious declarative configuration.

If you want a temporary environment with some packages, you have nix-shell -p. If you want packages available permanently, you have users.users.<name>.packages or home-manager’s home.packages.

note: If you’re using Nix apart from NixOS and you just intend to use it like you would a traditional package manager, this does not necessarily apply.

⟰ Some NixOS Notes
⟸ Packages and Derivations