fix(stasis): put swaylock and brightnessctl on the unit PATH
stasis does not run the configured actions through a login shell, so /etc/profile never applies and nothing resolves via /run/current-system/sw/bin. The old comment claimed the opposite and listed only the binaries stasis spawns directly, which left swaylock unreachable: `niri msg` worked, so the chain looked healthy while the lock step never ran. The failure is silent. The spawn fails, stasis logs the action as started, sees the immediate exit, treats the step as finished and stops there -- the daemon then sits in "waiting for idle" with no lock and no dpms. Verified: with an absolute path in the config, `stasis trigger lock_screen` locks; with a bare `swaylock` and the old PATH it exits instantly. brightnessctl comes along for the laptop's brightness step, which has the same problem.
This commit is contained in:
1 parent
a85f89ff1b
commit
95e502e60a
1 file changed
+16
-6
+16
-6
@@ -123,12 +123,22 @@
|
||||
partOf = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
# stasis runs the configured actions as `sh -lc`, so those resolve through
|
||||
# /etc/profile and need nothing here beyond a shell to start. niri, pactl
|
||||
# and notify-send it spawns directly, past the shell, and pactl is why
|
||||
# pulseaudio appears at all — it stays off systemPackages, see
|
||||
# modules/desktop.nix.
|
||||
path = with pkgs; [ bashNonInteractive niri pulseaudio libnotify ];
|
||||
# Every binary a configured action names has to be listed here. stasis does
|
||||
# not run the actions through a login shell, so /etc/profile never applies
|
||||
# and nothing resolves via /run/current-system/sw/bin. A missing binary is
|
||||
# silent: the spawn fails, stasis logs the action as started, sees the
|
||||
# immediate exit, treats the step as finished and stops there — which is how
|
||||
# swaylock was absent for the whole idle chain while `niri msg` worked.
|
||||
# pactl is why pulseaudio appears at all — it stays off systemPackages, see
|
||||
# modules/desktop.nix. brightnessctl is for the laptop's brightness step.
|
||||
path = with pkgs; [
|
||||
bashNonInteractive
|
||||
niri
|
||||
pulseaudio
|
||||
libnotify
|
||||
swaylock
|
||||
brightnessctl
|
||||
];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${lib.getExe pkgs.stasis}";
|
||||
|
||||
Reference in new issue
Block a user