Questions about `inputs.nixpkgs`

Note that you can also use the channel tarballs as flake inputs if GitHub downtime (or ratelimiting and censoring) is a concern, e.g. https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz. This actually has some benefits over using the git repo directly, mostly some artifact generation that isn’t done in-source, and these tarballs are tied to hydra evaluation completion so AIUI you’re a bit less likely to hit uncached artifacts (see also what @grahamc and @waffle8946 refer to with cache misses).

It sadly also comes at a pretty hefty evaluation cost; it’d be nice to have better support for the hydra tarball infrastructure in nix. Actually it doesn’t, see this post. I think this means you should objectively be locking to the hydra output tarballs, using the github:NixOS/nixpkgs URLs is just wrong.

Honestly, nixpkgs mirroring is an interesting question. I wonder how accessible nixpkgs is in China, and to what extent the packages are buildable. Probably not very, which is a shame given how much nix lends itself to making FOSS available through source location substitution.

9 Likes