dotfiles/nixos/configs/storage-optimization.nix
2024-11-07 16:25:41 -07:00

18 lines
416 B
Nix

#
# Configuration for systems that have limited storage, or which should
# otherwise have automatic cleanup and optimization of the store.
#
# vim: et:ts=2:sw=2:
#
{ config, pkgs, ... }:
{
# Enable automatic GC to keep this system light.
nix.gc = {
automatic = true;
options = "--delete-older-than 14d";
};
# Enable storage optimization, when possible.
nix.settings.auto-optimise-store = true;
}