Nix
| Commands | Description |
|---|---|
nix-info -m | Get high level info of Nix in a mardown format |
nix-env {-i | --install} <package> | Install package. Nix will first try to get it in pre-compiled form from a binary cache. If no binary is available, it will build the package from source. |
nix-env {-e | --uninstall} <package> | Uninstall package |
nix-env -u <package> | Upgrade package to newer version |
nix-env -u | Upgrade all packages |
nix-env -u --dry-run | See what nix will about to upgrade, without actually upgrading it. |
nix-env -qa | Query available packages. You may also query packages by name. Eg. nix-env -qa ruby |
nix-collect-garbage -d | Deletes old packages |
nix-env --rollback | Rollback to previous generation |
nix-env --list-generations | List all available generations |
nix-env -G <generation number> | Switch to specific generation. Eg. nix-env -G 1 |
nix-env --delete-generations <generation number...> | Delete specific generations. Eg. nix-env --delete-generations 1 2 |
nix-channel --update | Obtain latest Nix expressions in every subscribed channels |
nix-shell -p <package>
Starts an iteractive shell with the specified pacakge.
Eg.,
$ nix-shell -p cowsay
$ cowsay hello world
_____________
< hello world >
-------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
Search for Node.js packages
To search for a node.js package, you'll have to run this command: nix-env -qaPA nixpkgs.nodePackages | grep <node package>
Eg.,
nix-env -qaPA nixpkgs.nodePackages | grep firebase-tools