nixos/displayManager: add XDG_SESSION_ID to systemd user environment
xss-lock needs XDG_SESSION_ID to respond to loginctl lock-session(s) (and possibly other session operations such as idle hint management). This change adds XDG_SESSION_ID to the list of imported environment variables when starting systemctl. Inspired by home-manager, add importVariables configuration. Set session to XDG_SESSION_ID when running xss-lock as a service. Co-authored-by: misuzu <bakalolka@gmail.com>
This commit is contained in:
@@ -34,7 +34,7 @@ in
|
||||
partOf = [ "graphical-session.target" ];
|
||||
serviceConfig.ExecStart = with lib;
|
||||
strings.concatStringsSep " " ([
|
||||
"${pkgs.xss-lock}/bin/xss-lock"
|
||||
"${pkgs.xss-lock}/bin/xss-lock" "--session \${XDG_SESSION_ID}"
|
||||
] ++ (map escapeShellArg cfg.extraOptions) ++ [
|
||||
"--"
|
||||
cfg.lockerCommand
|
||||
|
||||
Reference in New Issue
Block a user