From 0fa2154a12283374250d9ea1888b96cdfbc9f757 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Tue, 25 Jan 2022 12:01:26 +0100 Subject: [PATCH] [General] Do not auto reboot if we are on desktop --- general.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/general.nix b/general.nix index 06cad00..98abea2 100644 --- a/general.nix +++ b/general.nix @@ -2,6 +2,7 @@ with lib; let cfg = config.aviallon.general; + desktopCfg = config.aviallon.desktop; nixConfigValue = value: if value == true then "true" else if value == false then "false" @@ -81,7 +82,7 @@ in nix.daemonIOSchedClass = "idle"; system.autoUpgrade.enable = mkDefault true; - system.autoUpgrade.allowReboot = mkDefault true; + system.autoUpgrade.allowReboot = mkIf (!desktopCfg.enable) (mkDefault true); system.autoUpgrade.dates = "00:00";