-
Notifications
You must be signed in to change notification settings - Fork 10
additionalNetrcSources silently ignored without FlakeHub auth #173
Description
Problem
On self-hosted CI runners using determinate-nix-action, custom additionalNetrcSources entries in /etc/determinate/config.json are silently dropped when the host is not authenticated to FlakeHub.
The binary contains the string auth: no flakehub token to augment user provided netrc sources, suggesting the code path that merges additional netrc sources is gated behind FlakeHub authentication. This means additionalNetrcSources — the official mechanism for adding private cache credentials — only works if the host happens to also be logged into FlakeHub.
Reproduction
- Install Determinate Nix 3.17.0 on a NixOS host (no FlakeHub login)
- Create
/etc/determinate/config.json:{"additionalNetrcSources": ["/etc/nix/cachix-netrc"]} - Restart nix-daemon / determinate-nixd
- Observe that
/nix/var/determinate/netrcdoes NOT include entries from/etc/nix/cachix-netrc - The log shows
config_file: Noneat startup
Expected behavior
additionalNetrcSources should work independently of FlakeHub authentication status. Users should be able to add private Cachix (or other) cache credentials without requiring a FlakeHub login.
Workaround
We currently use a systemd PathModified unit that watches /nix/var/determinate/netrc and re-appends cached entries from a durable source whenever determinate-nix-action (or the daemon) resets the file.
Related
- additionalNetrcSources doesn't work on 3.9.0+? #135 —
additionalNetrcSourcesnot working on 3.9.0+ - NixOS module netrc-file setting conflicts with custom settings #90 — NixOS module netrc-file conflicts
🤖 Filed with Claude Code on behalf of @schickling