Setup automatic garbage collection for NixOS - #6
Conversation
Add daily nix garbage collection with store optimization: - Conservative 14-day retention for most systems - Aggressive 7-day retention for china (125GB drive constraint)
Pull Request Review: Automatic Garbage Collection for NixOSOverviewThis PR adds automatic garbage collection and store optimization to all NixOS systems with system-specific overrides. The changes are well-structured and address a real need for disk space management. ✅ Strengths
🔍 Code Quality & Best Practicessystems/nixos/configuration.nix:86-95
systems/nixos/china/configuration.nix:9-10
💡 Suggestions & Considerations1. Timing Coordination (Minor)The garbage collection runs "daily" but does not specify a time. Consider setting explicit timing to avoid conflicts with system.autoUpgrade which runs at 03:00. 2. Store Optimization Timing (Minor)
3. Steam Deck (japan) Consideration (Question)Does japan (Steam Deck OLED) have storage constraints? SD cards can fill quickly with game data. Consider if it needs a china-style override. 4. Darwin System (Info)This PR only affects NixOS systems. The darwin (Mac Mini) system does not get these settings. Consider adding GC configuration there as well if needed. 🔒 Security & Performance
🧪 Test CoverageRecommended manual testing before merge:
📊 Impact Assessment
✅ VerdictLGTM with minor suggestions - This PR is ready to merge as-is. The suggestions above are optional improvements, not blockers. Great work on proactively managing disk space! This will prevent future "out of space" issues on china. |
Add daily nix garbage collection with store optimization: