More actions
This article is a stub. Please help expand it.
Nix is a package manager which is used on nest to allow users to install packages without the need of apt, which requires sudo (Superuser Do) permissions. It's normally used to make reproducible developer and production environments with just one file!
Installing a package
Normally, people use nix-env -i <package>
, but that is slow and takes up a lot of memory. Please instead use:
nix shell nixpkgs#package
Searching for a package
You can also search for the package you want online or by running nix search nixpkgs <package>
. It appears to use a lot of memory running it from the command line so it's recommended that you use the online version instead.
Make an empty shell
Sometimes you just need a blank slate with packages just for testing that you don't want to install to your main shell. Just run nix-shell -p <package> <package> <package>
with the package(s) you want. When you close out the shell, all of those packages will be gone.