Skip to content

globals: use StoreReference types in CLI argument handlers#15195

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

globals: use StoreReference types in CLI argument handlers#15195
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:store-reference-args

Conversation

@amaanq
Copy link
Member

@amaanq amaanq commented Feb 10, 2026

Motivation

The CLI flags --from, --to, --eval-store, and substituter URIs now
parse to StoreReference at the argument boundary. fetchClosure uses
StoreReference::parse instead of parseURL. This also adds
operator<=> to StoreReference.


Add 👍 to pull requests you find important.

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

The CLI flags `--from`, `--to`, `--eval-store`, and substituter URIs now
parse to `StoreReference` at the argument boundary. `fetchClosure` uses
`StoreReference::parse` instead of `parseURL`. This also adds
`operator<=>` to `StoreReference`.
@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 Make nix daemon a StoreConfigCommand globals: use StoreReference types in CLI argument handlers Feb 10, 2026
@amaanq amaanq changed the title globals: use StoreReference types in CLI argument handlers globals: use StoreReference types in CLI argument handlers Feb 10, 2026
Comment on lines +51 to +57
StoreReference remoteRef{
.variant = StoreReference::Specified{.scheme = "ssh", .authority = sshHost},
};
if (gzip)
remoteRef.params["compress"] = "true";
auto to = toMode ? openStore(StoreReference{remoteRef}) : openStore();
auto from = toMode ? openStore() : openStore(StoreReference{remoteRef});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In another PR on top of this, lets see if we can go directly to creating SSHStore::Config and then calling the openStore method on it.

@Ericson2314 Ericson2314 added this pull request to the merge queue Feb 11, 2026
Merged via the queue into NixOS:master with commit d5eda90 Feb 11, 2026
16 checks passed
@Ericson2314 Ericson2314 deleted the store-reference-args branch February 11, 2026 01:06
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.

2 participants