Skip to content

libstore: split out LogFileSettings#15051

Merged
Ericson2314 merged 1 commit into
NixOS:masterfrom
amaanq:split-build-log-settings
Jan 23, 2026
Merged

libstore: split out LogFileSettings#15051
Ericson2314 merged 1 commit into
NixOS:masterfrom
amaanq:split-build-log-settings

Conversation

@amaanq
Copy link
Copy Markdown
Member

@amaanq amaanq commented Jan 22, 2026

Motivation

This PR progresses on #5638

The log file settings (nixLogDir, keepLog, compressLog) are logically related but scattered in the large Settings class.

Context

This follows the same pattern as #15043 in that we:

  • Create a LogFileSettings struct that inherits from virtual Config
  • Have Settings privately inherit from it
  • Re-export the members via using declarations to preserve the existing API
  • Add a getLogFileSettings() getter for explicit dependency injection

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 January 22, 2026 17:28
@Ericson2314 Ericson2314 marked this pull request as draft January 22, 2026 17:35
@amaanq amaanq force-pushed the split-build-log-settings branch 2 times, most recently from 81e9142 to 1d3484e Compare January 22, 2026 18:12
@amaanq amaanq changed the title libstore: split out BuildLogSettings libstore: split out LogFileSettings Jan 22, 2026
@amaanq amaanq force-pushed the split-build-log-settings branch from 1d3484e to b8e5ec9 Compare January 22, 2026 18:22
@github-actions github-actions Bot added the new-cli Relating to the "nix" command label Jan 22, 2026
@amaanq amaanq force-pushed the split-build-log-settings branch from b8e5ec9 to 12aa7c7 Compare January 22, 2026 18:27
@github-actions github-actions Bot added the store Issues and pull requests concerning the Nix store label Jan 22, 2026
Comment thread src/libstore/include/nix/store/globals.hh Outdated
@amaanq amaanq force-pushed the split-build-log-settings branch 2 times, most recently from d850f12 to cfd262e Compare January 22, 2026 18:52
@amaanq amaanq marked this pull request as ready for review January 22, 2026 18:55
@amaanq amaanq requested a review from edolstra as a code owner January 22, 2026 18:55
amaanq added a commit to amaanq/nix that referenced this pull request Jan 22, 2026
This PR follows the same approach as NixOS#15043 and the
[`LogFileSettings`](NixOS#15051)
extraction:

- `GCSettings` struct inherits from virtual `Config`
- `Settings` privately inherits from it
- Accessed through `getGCSettings()`
amaanq added a commit to amaanq/nix that referenced this pull request Jan 22, 2026
This PR follows the same approach as NixOS#15043 and the
[`LogFileSettings`](NixOS#15051)
extraction:

- `GCSettings` struct inherits from virtual `Config`
- `Settings` privately inherits from it
- Accessed through `getGCSettings()`

The new method on `LocalStoreConfig` anticipates on making these
settings per-store. [This
commit](NixOS@0b606aa)
added both the autoGC and periodic wakeups.
amaanq added a commit to amaanq/nix that referenced this pull request Jan 22, 2026
This PR follows the same approach as NixOS#15043 and the
[`LogFileSettings`](NixOS#15051)
extraction:

- `GCSettings` struct inherits from virtual `Config`
- `Settings` privately inherits from it
- Accessed through `getGCSettings()`

The new method on `LocalStoreConfig` anticipates on making these
settings per-store. 0b606aa added both
the autoGC and periodic wakeups, which is why we think they are related.
amaanq added a commit to amaanq/nix that referenced this pull request Jan 22, 2026
This PR follows the same approach as NixOS#15043 and the
[`LogFileSettings`](NixOS#15051)
extraction:

- `GCSettings` struct inherits from virtual `Config`
- `Settings` privately inherits from it
- Accessed through `getGCSettings()`

The new method on `LocalStoreConfig` anticipates on making these
settings per-store. 0b606aa added both
the autoGC and periodic wakeups, which is why we think they are related.
@amaanq amaanq force-pushed the split-build-log-settings branch from cfd262e to 34aed9a Compare January 23, 2026 17:57
@github-actions github-actions Bot added documentation with-tests Issues related to testing. PRs with tests have some priority repl The Read Eval Print Loop, "nix repl" command and debugger fetching Networking with the outside (non-Nix) world, input locking c api Nix as a C library with a stable interface labels Jan 23, 2026
@amaanq amaanq force-pushed the split-build-log-settings branch from 34aed9a to 9c2263a Compare January 23, 2026 18:01
@Mic92 Mic92 enabled auto-merge January 23, 2026 18:17
auto-merge was automatically disabled January 23, 2026 18:17

Head branch was pushed to by a user without write access

@amaanq amaanq force-pushed the split-build-log-settings branch from 9c2263a to 98178e2 Compare January 23, 2026 18:17
@Ericson2314 Ericson2314 enabled auto-merge January 23, 2026 18:23
@Ericson2314 Ericson2314 added this pull request to the merge queue Jan 23, 2026
Merged via the queue into NixOS:master with commit 1a17c9d Jan 23, 2026
14 checks passed
@amaanq amaanq deleted the split-build-log-settings branch January 23, 2026 19:37
amaanq added a commit to obsidiansystems/nix that referenced this pull request Jan 26, 2026
This PR follows the same approach as NixOS#15043 and the extraction in
NixOS#15051. The `DatabaseSettings` struct inherits from the virtual `Config`
class, and `Settings` privately inherits from it.
brittonr pushed a commit to brittonr/nix that referenced this pull request Apr 1, 2026
This PR follows the same approach as NixOS#15043 and the
[`LogFileSettings`](NixOS#15051)
extraction:

- `GCSettings` struct inherits from virtual `Config`
- `Settings` privately inherits from it
- Accessed through `getGCSettings()`

The new method on `LocalStoreConfig` anticipates on making these
settings per-store. afe1e5c added both
the autoGC and periodic wakeups, which is why we think they are related.
brittonr pushed a commit to brittonr/nix that referenced this pull request Apr 1, 2026
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 documentation fetching Networking with the outside (non-Nix) world, input locking new-cli Relating to the "nix" command repl The Read Eval Print Loop, "nix repl" command and debugger 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.

3 participants