From 37c838836ed79667b3092acef6444afd0730683d Mon Sep 17 00:00:00 2001 From: clerie Date: Sun, 3 Dec 2023 11:28:41 +0100 Subject: [PATCH] modules/nixfiles: Make nixfiles system upgrade not stop itself during upgrade --- modules/nixfiles/nixfiles-system-upgrade.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/nixfiles/nixfiles-system-upgrade.nix b/modules/nixfiles/nixfiles-system-upgrade.nix index 546478b..2b8bbcd 100644 --- a/modules/nixfiles/nixfiles-system-upgrade.nix +++ b/modules/nixfiles/nixfiles-system-upgrade.nix @@ -19,6 +19,10 @@ in }; config = mkIf cfg.enable { systemd.services.nixfiles-system-auto-upgrade = { + # Make sure this unit does not stop themself while upgrading + restartIfChanged = false; + unitConfig.X-StopOnRemoval = false; + serviceConfig = { Type = "oneshot"; ExecStart = pkgs.nixfiles-system-upgrade + "/bin/nixfiles-system-upgrade --no-confirm${optionalString cfg.allowReboot " --allow-reboot"}";