`nix flake update` fails with HTTP error 429

Hi,

I have an issue, that Github responds with an HTTP error 429, while downloading the nixpkgs archive:

johannes@johannes-pc:~/src/nixos-configuration]$ nix flake update
warning: unable to download 'https://github.com/NixOS/nixpkgs/archive/e5bdc4a41d4c072fe1e3787eaa0320a384741d44.tar.gz': HTTP error 429

response body:

429: Too Many Requests
For more on scraping GitHub and how it may affect your rights, please review our Terms of Service (https://docs.github.com/en/site-policy/github-terms/github-terms-of-service).; retrying in 80123 ms (attempt 1/5)
[0.2 KiB DL] downloading 'https://github.com/NixOS/nixpkgs/archive/e5bdc4a41d4c072fe1e3787eaa0320a384741d44.tar.gz'

Does anybody else gets this error? Is a temporary or permanent issue?

GitHub is exploding at the moment

GH is relatively better now.

Also you probably want to change your flake input URL to https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz (obviously substitute nixos-unstable as desired) to avoid this issue in the future; it pulls the tarball from NixOS infra, tarball ends up smaller and you avoid rate limits (if that was really the issue, and not just GH reporting a random error.).

You definitely do not want to use master as a flake input, use nixos-unstable at most.

5 Likes

Thanks @waffle8946 for the explanation and solution.