Nix is a standalone package manager from the NixOS family that can be installed on other Linux/Unix OS.
https://nixos.org/download.html
Installation:
To install nix on WSL:
sh <(curl -L https://nixos.org/nix/install) --no-daemon
Then add source $HOME/.nix-profile/etc/profile.d/nix.sh
to your .bashrc
or .zshrc
.
Usage:
- Searching a package:
nix-env -qa firefox
- installing a package:
nix-env -i firefox
ornix-env -iA nixpkgs.firefox
(works on non-nix OS only) - List installed packages:
nix-env -q
- Uninstall a package:
nix-env -e firefox
- Upgrade a package:
nix-env -u firefox
- Upgrade all packages:
nix-env -u
- Cleanup:
nix-collect-garbage -d
Top comments (0)