Add automatic garbage collection for home-manager user profiles

Configure nix.gc to automatically clean up old home-manager generations
weekly, which complements the existing system-level gc. Uses
--delete-older-than 10d on Linux to maintain a rollback window, but
overrides to -d on Darwin to work around a launchd bug where multi-part
options aren't properly split into separate arguments.
This commit is contained in:
2025-12-06 13:58:26 -08:00
parent 89994e3fc8
commit b3add6ddf8
2 changed files with 15 additions and 0 deletions

View File

@@ -4,4 +4,8 @@
imports = [
../aerospace
];
# Override to use -d instead of --delete-older-than on Darwin due to launchd bug
# https://github.com/nix-community/home-manager/issues/7211
nix.gc.options = "-d";
}