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
This commit is contained in:
Freya Andromeda
2026-07-08 02:40:41 +00:00
parent 05988b07fb
commit 2e947118ea
+3
View File
@@ -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";