From b48e25aa7d050bba8e9a4def1d3371f6b6d2beff Mon Sep 17 00:00:00 2001 From: pazpi Date: Wed, 8 Jan 2025 14:33:05 +0100 Subject: [PATCH] Autoupgrade is not working with colmena --- modules/utils/commons.nix | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/modules/utils/commons.nix b/modules/utils/commons.nix index 1fe69a7..4463fe1 100644 --- a/modules/utils/commons.nix +++ b/modules/utils/commons.nix @@ -6,21 +6,28 @@ in options.my.utils.commons = { enable = lib.mkEnableOption "Enable commons stuff that are always nice to have"; - allowReboot = lib.mkOption { - default = false; - type = lib.types.bool; - description = config.system.autoUpgrade.allowReboot; - }; + autoupgrade = { + enable = lib.mkEnableOption "Enable auto upgrade"; + + allowReboot = lib.mkOption { + default = false; + type = lib.types.bool; + description = config.system.autoUpgrade.allowReboot; + }; + + }; }; config = lib.mkIf cfg.enable { + time.timeZone = "Europe/Rome"; + # Auto update - system.autoUpgrade = { + system.autoUpgrade = lib.mkIf cfg.autoupgrade.enable { enable = true; randomizedDelaySec = "10min"; - allowReboot = cfg.allowReboot; + allowReboot = cfg.autoupgrade.allowReboot; }; nix = {