lock-before-sleep: export HOME, qs needs it to find the config

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169F2pgebpibASvMLou1awP
This commit is contained in:
rope 2026-08-21 11:59:53 +01:00
parent 35f3828715
commit 466e4bcd74

View file

@ -83,6 +83,10 @@ in
# one in User=, so it pointed qs at /run/user/0.
ExecStart = pkgs.writeShellScript "lock-before-sleep" ''
export XDG_RUNTIME_DIR=/run/user/$(${pkgs.coreutils}/bin/id -u)
# HOME too: system units don't set it for User=, and qs resolves
# the config (and thus the instance to talk to) via ~/.config —
# without it: "Could not find "default" config directory".
export HOME=/home/fred
${pkgs.quickshell}/bin/qs ipc call lock lock
${pkgs.coreutils}/bin/sleep 1
'';