A Nix store is three functions
A Nix store is comprised of just three functions, according to research conducted while building trynix. These functions allow a non-Nixpkgs store path to be booted, demonstrating that any medium or protocol can serve as a remote Nix store. The Nix client does not care about the specific medium or protocol used, as long as it can answer the three essential requests.
These requests involve the signature of a narinfo, which covers StorePath, NarHash, NarSize, and References, and does not include URL, FileHash, FileSize, or Compression. This means the URL field in the narinfo can be located anywhere on the internet, regardless of the host or protocol. Any archive fetched from this URL must match the NarHash of the corresponding narinfo.
If a protocol is not included by default in the Nix client, an HTTP proxy can be used to translate the three functions to the desired medium. Various store implementations have been discovered, including GitHub Pages and Releases, a cache assembled from GitHub release assets, DNS, pastebin, OCI registry, YouTube, npm, and many others.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.