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";
in {
nix = {
settings.experimental-features = [ "nix-command" "flakes" ];
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 7d";
dates = "weekly";
options = "--delete-older-than 30d";
};
extraOptions = ''
keep-outputs = true
keep-derivations = true
min-free = ${toString (100 * 1024 * 1024)}
max-free = ${toString (1024 * 1024 * 1024)}
'';
};
system.autoUpgrade.flake = flakeURL;