Make statically-linked Nix binaries discoverable

The statically-linked Nix binary enables unprivileged users to utilize the magic of Nix the portable way. It can be used as “a command-line Swiss army knife”, and an installation-free project manager for HPC clusters.

We already have Hydra jobs building statically-linked Nix for x86_64-linux and aarch64-linux, and Nix (starting from 2.10) even supports using ~/.local/share/nix/root as a chroot store automatically when being executed by an unprivileged user when /nix is not presented. However, there is no documentation about that, nor is there a link on the website for users to download. The only two ways to access it is either to:

  1. build it from an existing Nix setup (using attribute pkgsStatic.nix or pkgsCross.<system>.nix), or to
  2. Search this forum, find the post and the comment mentioning the Hydra job url, find a working build, and download manually.

It would be much easier if we could offer a link to the statically-linked Nix binary for the major systems (x86_64-linux, aarch64-linux, x86_64-darwin, aarch64-darwin) in the Nix Download page, and perhaps explain a bit about the use cases inside the manual.

Related issues:

https://github.com/NixOS/nixos-homepage/issues/963

13 Likes