Skip to content

libstore: split out local build and store related settings under LocalSettings#15101

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:split-local-store-settings
Feb 5, 2026
Merged

libstore: split out local build and store related settings under LocalSettings#15101
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:split-local-store-settings

Conversation

@amaanq
Copy link
Member

@amaanq amaanq commented Jan 27, 2026

Motivation

The global Settings struct contained many settings that only apply to local builds or the local store (sandbox configuration, GC settings, build user groups, etc.). This commit extracts these into a dedicated LocalSettings struct in its own header, along with GCSettings and AutoAllocateUidSettings.

This improves code organization and prepares for eventually making these per-store settings in the future. Settings are accessed via getLocalSettings() from the global settings object or through LocalStoreConfig::getLocalSettings() for store-specific access.

Context

Depends on #15119


Add 👍 to pull requests you find important.

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

@github-actions github-actions bot added new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store labels Jan 27, 2026
@amaanq amaanq force-pushed the split-local-store-settings branch 3 times, most recently from 8200988 to f2baf21 Compare January 27, 2026 21:27
@amaanq
Copy link
Member Author

amaanq commented Jan 27, 2026

N.B. The to_json impl for PathsInChroot is needed because LocalSettings is now registered with GlobalConfig, which serializes all settings to JSON. No longer correct, was due to an incorrect include being added.

@amaanq amaanq force-pushed the split-local-store-settings branch 3 times, most recently from 19184d1 to 4d31e80 Compare January 27, 2026 22:57
@amaanq amaanq force-pushed the split-local-store-settings branch 2 times, most recently from 6e941af to aacc54f Compare January 28, 2026 17:09
@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Jan 28, 2026
@amaanq amaanq force-pushed the split-local-store-settings branch 2 times, most recently from 97a3088 to 0dfa372 Compare January 29, 2026 01:51
@dpulls
Copy link

dpulls bot commented Feb 3, 2026

🎉 All dependencies have been resolved !

@Ericson2314 Ericson2314 force-pushed the split-local-store-settings branch 2 times, most recently from 948dd0d to 7751945 Compare February 5, 2026 00:45
@Ericson2314 Ericson2314 enabled auto-merge February 5, 2026 00:48
auto-merge was automatically disabled February 5, 2026 15:26

Head branch was pushed to by a user without write access

@amaanq amaanq force-pushed the split-local-store-settings branch from 7751945 to 8e65818 Compare February 5, 2026 15:26
…alSettings`

The global `Settings` struct contained many settings that only apply to
local builds or the local store (sandbox configuration, GC settings,
build user groups, etc.). This commit extracts these into a dedicated
`LocalSettings` struct in its own header, along with `GCSettings` and
`AutoAllocateUidSettings`.

This improves code organization and prepares for eventually making these
per-store settings in the future. Settings are accessed via
`getLocalSettings()` from the global settings object or through
`LocalStoreConfig::getLocalSettings()` for store-specific access.
@amaanq amaanq force-pushed the split-local-store-settings branch from 8e65818 to afd40ad Compare February 5, 2026 15:38
@amaanq
Copy link
Member Author

amaanq commented Feb 5, 2026

I rebased and force-pushed as CI was failing due to LocalSettings not being declared. See https://github.com/NixOS/nix/compare/7751945b6d903b3baab9da6c468f733014afcc19..8e6581860e9d5f1674682528292ec247a117dee4 for the diff

@Ericson2314 Ericson2314 enabled auto-merge February 5, 2026 15:45
@Ericson2314 Ericson2314 added this pull request to the merge queue Feb 5, 2026
Merged via the queue into NixOS:master with commit 4496a7e Feb 5, 2026
14 checks passed
@Ericson2314 Ericson2314 deleted the split-local-store-settings branch February 5, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants