December 18, 2024·4 min read·engineeringnixcachingauthenticationmigration

Determinate Nix lets managed cache credentials coexist with an older cache

Customer-defined netrc entries let a migration retain authenticated access to an old cache while Determinate Nix manages FlakeHub credentials.

Moving to a new binary cache does not immediately remove the need to read the old one. Existing machines can still need access to results stored behind the previous authentication arrangement. Determinate Nix's December change addresses that overlap by allowing customer-defined entries in the netrc file it generates for Nix.

The 18 December announcement describes requests from customers migrating to FlakeHub Cache who wanted continued read access to their earlier cache. The new capability extends the generated authentication file. It does not claim to transfer every stored result or to replace all the customer's existing static credentials automatically.

I find this a practical detail in the operational side of Nix. Describing a build's inputs does not decide which authentication systems must remain available while an organisation changes services. The transition needs to preserve access to the results people still use.

The generated file already has an owner

Determinate Nix manages FlakeHub authentication tokens and synthesizes a netrc file that Nix can use. The announcement describes cloud-native authentication through mechanisms including JWTs and Amazon's Instance Metadata Service. The generated file is the connection between that managed credential lifecycle and Nix's authenticated requests.

That arrangement creates a configuration-ownership question. A generated file is maintained by the system producing it. A customer with credentials for another service needs a supported way to include them without treating the generated output as an independent file to edit manually.

The December addition supplies that supported extension point. Customer entries can coexist with the entries Determinate Nix creates for FlakeHub. The generator can retain responsibility for its managed material while incorporating the explicitly supplied material required for the old cache.

This is more precise than describing the feature as generic credential migration. The supplied credentials retain their own origin. The change concerns where Nix can obtain them during a request. Authentication policy at the old service is not automatically transformed into FlakeHub's policy merely because both appear in the resulting file.

Two credential lifecycles can overlap

The announcement contrasts rotating per-user FlakeHub credentials and SSO support with the static credentials customers still share across machines. Those arrangements can exist simultaneously during migration. A team may want the new identity model while retaining a practical dependency on the old one.

Allowing both sets of entries gives the transition an intermediate state. A machine does not have to lose authenticated read access to the old cache merely to participate in the new service. That removes one reason the organisation might otherwise need to change every dependent workflow at once.

The old credential remains an old credential, however. Its access scope and rotation responsibility still follow the earlier arrangement. Adding it to a managed file does not establish that the new service now rotates it or makes it individual to each user. The announcement does not make either claim.

This distinction is useful when explaining what automation actually takes over. It can manage its own token lifecycle and distribute a combined configuration to Nix. The customer still needs to know which entries come from static credentials and who remains responsible for them.

Authentication and cached results are different migration tasks

A binary cache transition includes access to content and authority to fetch that content. The December feature addresses the second requirement for an existing cache. It makes the necessary credentials available through the generated authentication configuration described by the source.

That is not equivalent to saying the new cache already contains everything the old cache holds. The announcement motivates continued reads precisely because the old service remains useful during the transition. Content placement and authentication can therefore move on different schedules.

The distinction also avoids promising a cache-selection policy that the source does not specify. A combined authentication file establishes available credentials. It does not by itself describe the order in which every configured cache is consulted or a universal fallback rule for every request.

For someone assessing the change, that narrow scope is enough to explain its value. An authenticated request to the old service can remain possible while the new service handles its own users and tokens. A transition can then preserve an existing dependency without requiring the two services to share an identity system.

The addition extends October's integrated model

The October launch positioned Determinate Nix as a downstream distribution whose separate supervisor manages operational integration around Nix. Cache setup and authentication were part of that initial story. December adds a way for that integration to accommodate another service during a changeover.

This is a useful constraint on the original convenience. A tool that owns configuration for one service also needs to account for other valid configuration a customer still requires. An explicit extension mechanism lets the generated state reflect that overlap instead of assuming that adopting the new service eliminates the old dependency immediately.

I prefer this incremental account of migration. The change does not require pretending that static credentials have already disappeared or that all cache contents have moved. It gives Nix access to the customer-supplied entries while Determinate continues managing the FlakeHub entries, leaving the remaining migration steps visible as separate work.