Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Nix

From Nest Guides
Revision as of 04:06, 27 March 2024 by David (talk | contribs) (Add Nix stub)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.