Skip to content

feat(base): add nix store garbage collection and boot entry limits - #322

Merged
stackptr merged 3 commits into
mainfrom
nix-gc-config
Mar 7, 2026
Merged

stackptr merged 3 commits into
mainfrom
nix-gc-config

Conversation

@stackptr

@stackptr stackptr commented Mar 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Add modules/base/gc.nix for automatic Nix store garbage collection across all hosts
  • Weekly GC with --delete-older-than 30d on both NixOS (nix.gc.dates) and darwin (nix.gc.interval)
  • Limit systemd-boot entries to 10 on NixOS (boot.loader.systemd-boot.configurationLimit)

Test plan

  • nh os switch .#glyph — verify NixOS gc timer and boot config apply
  • nh darwin switch .#Rhizome — verify darwin gc launchd interval applies

🤖 Generated with Claude Code

Configure automatic weekly GC across all platforms with
--delete-older-than 30d. Limits systemd-boot entries to 10 on NixOS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@stackptr
stackptr enabled auto-merge (squash) March 7, 2026 16:32
@stackptr
stackptr disabled auto-merge March 7, 2026 16:34
stackptr and others added 2 commits March 7, 2026 08:37
mkIf only guards the value, not the option definition, so the boot
option was still being defined on darwin where it doesn't exist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Using pkgs at the module top level (via //) forces eager evaluation
during module structure resolution, causing infinite recursion. Move
boot.loader config to a NixOS-specific module where it belongs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@stackptr
stackptr merged commit b15c282 into main Mar 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant