From 2e947118ea6e9cf5c65c6feb6f1573a2d10d122a Mon Sep 17 00:00:00 2001 From: Freya Andromeda Date: Wed, 8 Jul 2026 01:18:48 +0000 Subject: [PATCH] nixos/incus: fix incus containers being wrongly restarted on package update whilst softDaemonRestart is set When softDaemonRestart is enabled, containers and virtual machines still get restarted when incus updates Disabling stopIfChanged on both incus-startup and incus fixes this --- nixos/modules/virtualisation/incus.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/modules/virtualisation/incus.nix b/nixos/modules/virtualisation/incus.nix index 7d94e9621977..52f34ccd8378 100644 --- a/nixos/modules/virtualisation/incus.nix +++ b/nixos/modules/virtualisation/incus.nix @@ -446,6 +446,8 @@ in ] ++ lib.optionals (cfg.useACMEHost != null) [ "acme-${cfg.useACMEHost}.service" ]; + stopIfChanged = lib.mkIf cfg.softDaemonRestart false; + serviceConfig = { ExecStart = "${cfg.package}/bin/incusd --group incus-admin"; ExecStartPost = "${cfg.package}/bin/incusd waitready --timeout=${cfg.startTimeout}"; @@ -504,6 +506,7 @@ in # restarting this service will affect instances restartIfChanged = false; + stopIfChanged = false; serviceConfig = { ExecStart = "${incus-startup} start";