add automatic garbage collect to vps host

This commit is contained in:
Yan Lin 2025-10-25 14:58:02 +02:00
parent 953f87c7e0
commit 27408723d9

View file

@ -17,6 +17,20 @@
device = "nodev"; # Required for EFI systems device = "nodev"; # Required for EFI systems
efiSupport = true; efiSupport = true;
efiInstallAsRemovable = true; # Better compatibility with VPS efiInstallAsRemovable = true; # Better compatibility with VPS
configurationLimit = 5; # Keep only 5 boot entries to save storage
};
# Automatic garbage collection to save storage
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
# Automatic store optimization to deduplicate files
nix.optimise = {
automatic = true;
dates = [ "weekly" ];
}; };
# Network configuration # Network configuration