mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
screen-locker: fix systemd unit
In particular, don't add trailing backslashes introduced by
`xautolockExtraOptions`. Systemd's unit file parser seems to have
gotten a bit stricter and with systemd 242, the trailing backslash
caused the next non-empty line to be ignored.
In that case, this was `[Section]`, so all subsequent settings were
mistakenly added to `[Service]`, causing them to be ignored entirely.
Simplify and fix this by using `concatStringsSep` to build a single
`ExecStart` line.
(cherry picked from commit 8991fe2e90
)
This commit is contained in:
parent
81d600d948
commit
d714740961
1 changed files with 6 additions and 7 deletions
|
@ -58,13 +58,12 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = ''
|
ExecStart = concatStringsSep " " ([
|
||||||
${pkgs.xautolock}/bin/xautolock \
|
"${pkgs.xautolock}/bin/xautolock"
|
||||||
-detectsleep \
|
"-detectsleep"
|
||||||
-time ${toString cfg.inactiveInterval} \
|
"-time ${toString cfg.inactiveInterval}"
|
||||||
-locker '${pkgs.systemd}/bin/loginctl lock-session $XDG_SESSION_ID' \
|
"-locker '${pkgs.systemd}/bin/loginctl lock-session $XDG_SESSION_ID'"
|
||||||
${concatStringsSep " " cfg.xautolockExtraOptions}
|
] ++ cfg.xautolockExtraOptions);
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue