Skip to content

libstore: split out GCSettings#15058

Merged
edolstra merged 1 commit intoNixOS:masterfrom
amaanq:split-gc-settings
Jan 23, 2026
Merged

libstore: split out GCSettings#15058
edolstra merged 1 commit intoNixOS:masterfrom
amaanq:split-gc-settings

Conversation

@amaanq
Copy link
Member

@amaanq amaanq commented Jan 22, 2026

Motivation

The GC settings (reservedSize, keepOutputs, keepDerivations, minFree, maxFree, minFreeCheckInterval) are all related to garbage collection but currently live scattered across the large Settings class.

Context

This PR follows the same approach as #15043 and the LogFileSettings 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.


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 22, 2026
@amaanq amaanq force-pushed the split-gc-settings branch 4 times, most recently from f94137f to 34002d6 Compare January 22, 2026 21:32
@amaanq amaanq force-pushed the split-gc-settings branch 3 times, most recently from 9806f4d to 865ff4a Compare January 22, 2026 22:04
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-gc-settings branch from 865ff4a to 6f0fe56 Compare January 22, 2026 22:06
@edolstra edolstra added this pull request to the merge queue Jan 23, 2026
Merged via the queue into NixOS:master with commit 4c6ad72 Jan 23, 2026
14 checks passed
@amaanq amaanq deleted the split-gc-settings branch January 28, 2026 03:49
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants