• Update channel: nix-channel --update nixos; nixos-rebuild switch

  • Update system: sudo nixos-rebuild switch


Find a package

Query (-q) available (-a) packages:

nix-env -qa [regex]


nix-env -qa "firefox.*"

Add -s to show status of matching packages:

$ nix-env -qas
-PS bash-3.0
--S binutils-2.15
IPS bison-1.875d

I = installed in current environment,
P = present on system (so very fast to add to environment),
S = there's a binary available so you won't have to compile it.

Query just installed packages:

nix-env -q [pattern]

Create a Python virtualenv is a good start.

Declarative package management