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/netrc does NOT include entries from /etc/nix/cachix-netrc
- The log shows
config_file: None at 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
🤖 Filed with Claude Code on behalf of @schickling
Problem
On self-hosted CI runners using
determinate-nix-action, customadditionalNetrcSourcesentries in/etc/determinate/config.jsonare 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 meansadditionalNetrcSources— the official mechanism for adding private cache credentials — only works if the host happens to also be logged into FlakeHub.Reproduction
/etc/determinate/config.json:{"additionalNetrcSources": ["/etc/nix/cachix-netrc"]}/nix/var/determinate/netrcdoes NOT include entries from/etc/nix/cachix-netrcconfig_file: Noneat startupExpected behavior
additionalNetrcSourcesshould 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
PathModifiedunit that watches/nix/var/determinate/netrcand re-appends cached entries from a durable source wheneverdeterminate-nix-action(or the daemon) resets the file.Related
additionalNetrcSourcesnot working on 3.9.0+