From 9890583d8a0b3eb7d4d49fa8958d67ddefde6f96 Mon Sep 17 00:00:00 2001 From: RootHost-Stormwind Date: Sun, 1 Nov 2026 18:20:59 +0100 Subject: [PATCH] tweak: merge auto-upgrade.nix into automatic-upgrades.nix (gc 30d, optimise) --- auto-upgrade.nix | 13 ------------- automatic-upgrades.nix | 2 ++ master.nix | 1 - 3 files changed, 2 insertions(+), 14 deletions(-) delete mode 100644 auto-upgrade.nix 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