diff --git a/auto-upgrade.nix b/auto-upgrade.nix deleted file mode 100644 index 844dd02..0000000 --- a/auto-upgrade.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, ... }: - -{ - # Rebuild once a day to automatically apply security patches - system.autoUpgrade.enable = true; - nix.optimise.automatic = true; - nix.gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 30d"; - }; -} - diff --git a/automatic-upgrades.nix b/automatic-upgrades.nix index a226886..d7669db 100644 --- a/automatic-upgrades.nix +++ b/automatic-upgrades.nix @@ -4,6 +4,8 @@ # Enable automatic garbage collection (prevents /boot or / filling up) nix.gc.automatic = true; nix.gc.dates = "03:00"; # run GC at 03:00 daily + nix.gc.options = "--delete-older-than 30d"; # drop generations older than 30 days + nix.optimise.automatic = true; # hard-link identical store files # This host has no configuration.nix: point at master.nix, # otherwise nixos-upgrade.service (and plain nixos-rebuild) cannot find the config. diff --git a/master.nix b/master.nix index 9b82c75..c2b63bd 100644 --- a/master.nix +++ b/master.nix @@ -26,7 +26,6 @@ in ./prometheus.nix ./cron.nix ./fde-lock.nix - #./auto-upgrade.nix ]; # This value determines the NixOS release from which the default