From 2e4582219f53c46d702c3f381cdea6fcae00eb35 Mon Sep 17 00:00:00 2001 From: imxyy_soope_ Date: Sat, 15 Aug 2026 13:44:33 +0800 Subject: [PATCH] niri: don't stop niri.service on switch niri-nix removed its X-StopIfChanged/X-RestartIfChanged drop-in for niri.service in acccaf2202, so switch-to-configuration-ng now stops the running compositor (killing the graphical session) whenever the niri store path changes. Restore the drop-in locally; the updated binary takes effect on the next login instead. --- modules/desktop/wm/niri/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/desktop/wm/niri/default.nix b/modules/desktop/wm/niri/default.nix index f5787dd..4586c94 100644 --- a/modules/desktop/wm/niri/default.nix +++ b/modules/desktop/wm/niri/default.nix @@ -58,6 +58,17 @@ in xdg-desktop-portal-gnome ]; }; + # Keep switch-to-configuration from stopping the running compositor + # when the niri store path changes; niri-nix dropped this drop-in in + # acccaf2202. The new binary takes effect on next login instead. + systemd.user.units."niri.service" = { + overrideStrategy = "asDropinIfExists"; + text = '' + [Service] + X-StopIfChanged=false + X-RestartIfChanged=false + ''; + }; systemd.user.services.niri-polkit = { description = "PolicyKit Authentication Agent"; wantedBy = [ "niri.service" ];