Is NixOS a source distro or a binary distro, or both?

NixOS is clearly a source code distribution, but it provides a pre-populated build cache.

The package index is not a mapping from package names to tarballs[1] to download and extract as a Debian or Centos does.

Instead the package index provides build instructions, that can be “evaluated”, and that produces a hash. This hash then can be resolved to a prebuild artifact via the substitution process. If you disable substitution, or the hash is not found, Nix will build the artifact from source transparently.

Not like with apt where you have to “install” a source package manually, and you still can not easily create a usable “installable” from it, if a source package is provided at all…

Personally I do not see any room for calling NixOS a “binary distro”.

[1]: Tarball is used as a generic term for antything that is basically just a packed folder structure with maybe metadata attached one way or the other.

1 Like