diff --git a/modules/common/default.nix b/modules/common/default.nix index 8084f24..0fa09cc 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -22,4 +22,29 @@ inherit inputs outputs; }; }; + + nix.optimise = { + automatic = true; + dates = [ "05:00" ]; + }; + + nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + + system.autoUpgrade = { + enable = true; + flake = inputs.self.outPath; + operation = "switch"; + flags = [ + "--recreate-lock-file" + "--commit-lock-file" + "--print-build-logs" + ]; + dates = "05:00"; + randomizedDelaySec = "45min"; + allowReboot = false; + }; }