Skip to content

libstore: make substitution use the per-store getReadOnly method#15218

Merged
Ericson2314 merged 1 commit into
NixOS:masterfrom
obsidiansystems:read-only-per-store
Feb 13, 2026
Merged

libstore: make substitution use the per-store getReadOnly method#15218
Ericson2314 merged 1 commit into
NixOS:masterfrom
obsidiansystems:read-only-per-store

Conversation

@amaanq
Copy link
Copy Markdown
Member

@amaanq amaanq commented Feb 13, 2026

Motivation

This commit introduces a getReadOnly method on the store config that returns if the current store is read only or not. This is then used in subtitution, so we fail gracefully with a nice error message if only the individual store is read-only.

As a bonus, it gets us one step closer to getting rid of the global because we can use the per-store method instead.


Add 👍 to pull requests you find important.

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

@amaanq amaanq requested a review from Ericson2314 as a code owner February 13, 2026 00:41
@github-actions github-actions Bot added the store Issues and pull requests concerning the Nix store label Feb 13, 2026
@amaanq amaanq changed the title nix flake metadata: Don't show "Inputs" if there are no inputs libstore: make substitution use the per-store getReadOnly method Feb 13, 2026
@amaanq amaanq changed the title libstore: make substitution use the per-store getReadOnly method libstore: make substitution use the per-store getReadOnly method Feb 13, 2026
This commit introduces a `getReadOnly` method on the store config that returns if the current store is read only or not. This is then used in subtitution, so we fail gracefully with a nice error message if only the individual store is read-only.

As a bonus, it gets us one step closer to getting rid of the global because we can use the per-store method instead.

Progress on NixOS#5638
@amaanq amaanq force-pushed the read-only-per-store branch from b18bcaa to 9ac91e3 Compare February 13, 2026 00:43
@Ericson2314 Ericson2314 added this pull request to the merge queue Feb 13, 2026
Merged via the queue into NixOS:master with commit ed22ef2 Feb 13, 2026
14 checks passed
@Ericson2314 Ericson2314 deleted the read-only-per-store branch February 13, 2026 02:21
brittonr pushed a commit to brittonr/nix that referenced this pull request Apr 1, 2026
libstore: make substitution use the per-store `getReadOnly` method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants