diff --git a/nixos/modules/vms.nix b/nixos/modules/vms.nix index e00feb6..7588fd1 100644 --- a/nixos/modules/vms.nix +++ b/nixos/modules/vms.nix @@ -262,7 +262,9 @@ in in { description = "Virtual machine '${n}'"; - requires = dependencies; + # Use `Wants=` instead of `Requires=`. Otherwise restarting the wait-online services will cause the VM to + # restart as well. + wants = dependencies; after = dependencies; serviceConfig = { ExecStop = mkIf i.cleanShutdown.enabled "${doCleanShutdown} /run/vms/${n}/monitor-qmp.sock";