diff --git a/modules/utilities/nixUtils.nix b/modules/utilities/nixUtils.nix index 5cf3ac8..a7c4531 100644 --- a/modules/utilities/nixUtils.nix +++ b/modules/utilities/nixUtils.nix @@ -6,10 +6,18 @@ nix.settings.cores = 6; }; flake.nixosModules.nixUtils = {pkgs-unstable, ...}: { + # Optimise the nix store + nix.optimise = { + automatic = true; + persistent = true; + randomDelaySec = "30min"; + dates = "Thu *-*-* 16:00:00"; + }; # Garbage collector of generations nix.gc = { automatic = true; - dates = "weekly"; + dates = "Wed *-*-* 16:00:00"; + persistent = true; options = "--delete-older-than 7d"; # every week delete generations older than a month };