NixOS: automatically collect garbage
- categories
- NixOS
The following enables automatic periodic garbage collection:
{ nix.gc.automatic = true; }
The default behavior (as of nix.gc.dates
, which (according to the configuration.nix
man page) takes “a calendar event in the format specified by ~systemd.time~” or a list of such. “For most desktop and server systems a sufficient garbage collection is once a week”, so:
{ nix.gc.dates = "weekly"; }