User Tools

Site Tools


manuals:distributions:nixos

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
manuals:distributions:nixos [2026/08/09 14:59] – Add the switch action to the nixos-rebuild command aithermanuals:distributions:nixos [2026/08/10 17:49] (current) panika
Line 35: Line 35:
 ===== Impermanence ===== ===== Impermanence =====
 See [[manuals:distributions:nixos:impermanence]]. See [[manuals:distributions:nixos:impermanence]].
 +
 +===== GitHub API limit =====
 +Nixpkgs  are downloaded from [[https://github.com/nixos/nixpkgs|GitHub]] and [[https://nixos.wiki/wiki/Binary_Cache|Binary Cache]]. GitHub does not support IPv6 and rate limits either  [[https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2026-03-10#primary-rate-limit-for-unauthenticated-users|per IPv4]] or [[https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2026-03-10#primary-rate-limit-for-authenticated-users|per user]].
 +After exhausting the API limit, Nix (or rather GitHub API) complains:
 +<code>
 +error: unable to download 'GITHUB_URL': HTTP error 403 ('')
 +
 +       response body:
 +
 +       {"message":"API rate limit exceeded for IP_ADDR. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}
 +</code>
 +The solution is to [[https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token|create personal access token]] (Public repositories, the Permissions could be blank) and enter [[https://search.nixos.org/options?channel=26.05&query=nix.settings&type=options#show=option%253Anix.settings|the configuration]] to Nix:
 +<code>
 +# configuration.nix
 +nix.settings.access-tokens = [ "github.com=github_pat_TokenTokenChangeMe" ];
 +</code>
 +
manuals/distributions/nixos.1786287547.txt.gz · Last modified: by aither