Revert "new systemd can't inhibit lid switches"
This reverts commit f9fb7b7457
.
Cf. https://github.com/jcumming/nixos/commit/da2c160471f73af
This commit is contained in:
parent
feb778507f
commit
8e0d77632e
@ -39,6 +39,16 @@ let
|
|||||||
exec > ~/.xsession-errors 2>&1
|
exec > ~/.xsession-errors 2>&1
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
${optionalString cfg.displayManager.desktopManagerHandlesLidAndPower ''
|
||||||
|
# Stop systemd from handling the power button and lid switch,
|
||||||
|
# since presumably the desktop environment will handle these.
|
||||||
|
if [ -z "$_INHIBITION_LOCK_TAKEN" ]; then
|
||||||
|
export _INHIBITION_LOCK_TAKEN=1
|
||||||
|
exec ${config.systemd.package}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key "$0" "$sessionType"
|
||||||
|
fi
|
||||||
|
|
||||||
|
''}
|
||||||
|
|
||||||
${optionalString cfg.startOpenSSHAgent ''
|
${optionalString cfg.startOpenSSHAgent ''
|
||||||
if test -z "$SSH_AUTH_SOCK"; then
|
if test -z "$SSH_AUTH_SOCK"; then
|
||||||
# Restart this script as a child of the SSH agent. (It is
|
# Restart this script as a child of the SSH agent. (It is
|
||||||
|
Loading…
Reference in New Issue
Block a user