Skip to content

globals: change store settings to use StoreReference types directly #15192

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:store-reference-types
Feb 11, 2026
Merged

globals: change store settings to use StoreReference types directly #15192
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:store-reference-types

Conversation

@amaanq
Copy link
Member

@amaanq amaanq commented Feb 10, 2026

Motivation

The storeUri, substituters, and trustedSubstituters settings now
store typed StoreReference values directly instead of raw strings,
so callers work with the real types without manual parsing.

Context

This is a reworked version of #10761.


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@amaanq amaanq marked this pull request as draft February 10, 2026 21:23
@amaanq amaanq changed the title globals: make store settings private with typed accessors @amaanq globals: change store settings to use StoreReference types directly Feb 10, 2026
@github-actions github-actions bot added new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store c api Nix as a C library with a stable interface labels Feb 10, 2026
@amaanq amaanq changed the title @amaanq globals: change store settings to use StoreReference types directly globals: change store settings to use StoreReference types directly Feb 10, 2026
@amaanq amaanq force-pushed the store-reference-types branch 2 times, most recently from 06d177b to 17c9d20 Compare February 10, 2026 22:40
@amaanq amaanq closed this Feb 10, 2026
@amaanq amaanq deleted the store-reference-types branch February 10, 2026 22:42
@Ericson2314 Ericson2314 restored the store-reference-types branch February 10, 2026 22:42
@Ericson2314 Ericson2314 reopened this Feb 10, 2026
@amaanq amaanq force-pushed the store-reference-types branch 4 times, most recently from 6cbfcd5 to 400df01 Compare February 11, 2026 03:59
@amaanq amaanq changed the title globals: change store settings to use StoreReference types directly globals: change store settings to use StoreReference types directly Feb 11, 2026
@amaanq amaanq force-pushed the store-reference-types branch 10 times, most recently from 0c02f2c to 0ea3212 Compare February 11, 2026 15:54
@amaanq amaanq marked this pull request as ready for review February 11, 2026 16:05
@amaanq amaanq force-pushed the store-reference-types branch from 0ea3212 to 336fd02 Compare February 11, 2026 16:14
@amaanq amaanq force-pushed the store-reference-types branch 10 times, most recently from c95950f to 8594cd7 Compare February 11, 2026 16:52
The `storeUri`, `substituters`, and `trustedSubstituters` settings now
store typed `StoreReference` values directly instead of raw strings,
so callers work with the real types without manual parsing.

This is a reworked version of NixOS#10761.
@amaanq amaanq force-pushed the store-reference-types branch from 8594cd7 to 857fd2a Compare February 11, 2026 17:05
@Ericson2314 Ericson2314 added this pull request to the merge queue Feb 11, 2026
Merged via the queue into NixOS:master with commit ae4e4d9 Feb 11, 2026
14 checks passed
@Ericson2314 Ericson2314 deleted the store-reference-types branch February 11, 2026 18:33
@rszyma
Copy link
Contributor

rszyma commented Feb 25, 2026

On the latest master I started getting an error with this in my nixos config, while it previously worked.

{
  nix.settings.trusted-substituters = ["nixremote"];  # a name from .ssh/config
}
$ nix --version
error: Cannot parse Nix store 'nixremote'

Git bisect points to 857fd2a (this PR).
Looks like an unintentional breaking change?

@Ericson2314
Copy link
Member

Did your substituter actually work? or was it ignoring it (perhaps silently) as invalid?

@rszyma
Copy link
Contributor

rszyma commented Feb 25, 2026

Nope, now that I look, I didn't have it set in substituters/extra-substituters. When i set it on old version I get a warning:

warning: Cannot parse Nix store 'nixremote'

So it was invalid before, but didn't hard error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c api Nix as a C library with a stable interface new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants