Nix can be installed on Linux or Mac systems. If you're using the Nix based Linux distribution, NixOS, then you'll already have it installed. Otherwise the official nix website provides the most up to date installation steps, which at the time of writing are
Windows (run in WSL):
The default on Linux and MacOS is to do what's called a multi-user install, where Nix packages are available to all users. This does require more involved setup steps - luckily however, the official installer handles this for you these days. It will also create some user accounts to run build scripts isolated from your current user profile.
The multi-user install creates a directory
/nix, which all packages are installed into.
This is technically configurable, but if you do so you'll need to compile all packages
yourself, as for example, native libraries hardcode their search path into the binary
itself when compiled with your C compiler. On the other hand, if you stick with the defaults,
you'll be able to download packages from the official Nix package cache.
Since version 10.11, MacOS makes this process harder than it was, so the MacOS installer
will also create a virtual volume and mount it to
/nix as it cannot create a
directory on the root volume due to System Integrity Protection (SIP).
In current releases (2.5+), the new CLI and flake tooling are still marked experimental.
These are two features of the new nix tooling make it much nicer to use than the old style, so the next step after installation will be to enable them.
To enable these features, edit
/etc/nix/nix.conf and add/modify the following line:
experimental-features = nix-command flakes
With that, you're all set up for the modern nix experience. Next time, I'll guide you in trying out the nix package manager CLI.