fix: authenticate nix github fetches to dodge the 60/hr rate limit
CI / lint (push) Successful in 29s
CI / eval (push) Failing after 20m25s

Unauthenticated flake input fetches from github.com were hitting 429.
Token lives in /etc/nix/github-token.conf (root:root 600, out-of-band —
never in git or /nix/store) and nix.conf !includes it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Miguel Palhas
2026-08-17 15:03:31 +01:00
parent 65b95bb1fa
commit df319322b9
+8
View File
@@ -23,6 +23,14 @@
# GC is handled by `nh clean` below (keep-N / keep-since semantics). # GC is handled by `nh clean` below (keep-N / keep-since semantics).
# The two are mutually exclusive — nh asserts if nix.gc.automatic is on. # The two are mutually exclusive — nh asserts if nix.gc.automatic is on.
gc.automatic = false; gc.automatic = false;
# Unauthenticated GitHub API calls (flake input fetches) are capped at
# 60/hr and 429 quickly. The token itself must not land in /nix/store
# (world-readable), so it lives in a plain file outside Nix's management —
# !include reads it at nix.conf parse time instead of embedding it.
extraOptions = ''
!include /etc/nix/github-token.conf
'';
}; };
# nh: ergonomic nixos-rebuild wrapper. Auto-detects the target from the # nh: ergonomic nixos-rebuild wrapper. Auto-detects the target from the