Enable automatic store optimisation

Update automatic gc
This commit is contained in:
Evie Litherland-Smith 2023-09-04 09:00:09 +01:00
parent e5158bcc51
commit ed8a392ba9

View file

@ -2,15 +2,20 @@
let flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main"; let flakeURL = "git+https://git.xenia.me.uk/xenia/nixos.git?ref=main";
in { in {
nix = { nix = {
settings.experimental-features = [ "nix-command" "flakes" ]; settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
gc = { gc = {
automatic = true; automatic = true;
dates = "daily"; dates = "weekly";
options = "--delete-older-than 7d"; options = "--delete-older-than 30d";
}; };
extraOptions = '' extraOptions = ''
keep-outputs = true keep-outputs = true
keep-derivations = true keep-derivations = true
min-free = ${toString (100 * 1024 * 1024)}
max-free = ${toString (1024 * 1024 * 1024)}
''; '';
}; };
system.autoUpgrade.flake = flakeURL; system.autoUpgrade.flake = flakeURL;