====== Nix ======
===== Select channel =====
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update
===== Search package =====
nix-env -qa PACKAGE_NAME
# or use nox, install with nix-env -iA nox
nox PACKAGE_NAME
===== Install package =====
nix-env -i PACKAGE_NAME
===== Remove package =====
nix-env -e PACKAGE_NAME
# same as nix-env --uninstall PACKAGE_NAME
===== Garbage collection =====
nix-collect-garbage -d
===== List installed package =====
nix-env -q
===== Rebuild =====
vi /etc/nixos/configuration.nix
nixos-rebuild switch
nix-env --list-generations
**ref:**
http://nixos.org/nix/manual/#chap-quick-start
https://nixos.org/wiki/Cheatsheet
https://distrowatch.com/dwres.php?resource=package-management