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.
This commit is contained in:
2026-08-15 13:44:33 +08:00
parent 3898153f27
commit 2e4582219f
+11
View File
@@ -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" ];