Problem
The managed garbage collector in determinate-nixd uses a disk-pressure-based strategy (keeping 5-20% free), which works well for preventing disk-full situations. However, there's no way to configure age-based retention — equivalent to nix-collect-garbage --delete-older-than 30d.
Use case
On NixOS, nix.gc supports both dates (schedule) and options = "--delete-older-than 30d" for predictable, time-based pruning of old generations. On nix-darwin with determinateNix.enable = true, nix.gc is unavailable (nix.enable is false), and there's no equivalent in the determinateNixd.garbageCollector config.
Age-based pruning is useful for:
- Keeping a predictable rollback window (e.g. "always keep last 30 days")
- Preventing unbounded accumulation of generations even when disk space is plentiful
- Matching the behavior users expect from
nix.gc on NixOS
Proposal
Add an option to the managed GC config (e.g. in determinateNixd.garbageCollector) for age-based retention, something like:
determinateNix.determinateNixd.garbageCollector = {
strategy = "automatic";
deleteOlderThan = "30d"; # optional, prune generations older than this
};
This would complement the existing disk-pressure strategy rather than replace it.
Created on behalf of @schickling by Claude Code
Problem
The managed garbage collector in
determinate-nixduses a disk-pressure-based strategy (keeping 5-20% free), which works well for preventing disk-full situations. However, there's no way to configure age-based retention — equivalent tonix-collect-garbage --delete-older-than 30d.Use case
On NixOS,
nix.gcsupports bothdates(schedule) andoptions = "--delete-older-than 30d"for predictable, time-based pruning of old generations. On nix-darwin withdeterminateNix.enable = true,nix.gcis unavailable (nix.enableisfalse), and there's no equivalent in thedeterminateNixd.garbageCollectorconfig.Age-based pruning is useful for:
nix.gcon NixOSProposal
Add an option to the managed GC config (e.g. in
determinateNixd.garbageCollector) for age-based retention, something like:This would complement the existing disk-pressure strategy rather than replace it.
Created on behalf of @schickling by Claude Code