Merge pull request #9727 from Profpatsch/dm-lid-management
remove desktopManagerHandlesLidAndPower
This commit is contained in:
commit
4c17d3892b
@ -49,18 +49,6 @@ let
|
|||||||
fi
|
fi
|
||||||
''}
|
''}
|
||||||
|
|
||||||
${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
|
|
||||||
if ! ${config.systemd.package}/bin/loginctl show-session $XDG_SESSION_ID | grep -q '^RemoteHost='; then
|
|
||||||
exec ${config.systemd.package}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key --why="Desktop environment handles power events" "$0" "$sessionType"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
''}
|
|
||||||
|
|
||||||
${optionalString cfg.startGnuPGAgent ''
|
${optionalString cfg.startGnuPGAgent ''
|
||||||
if test -z "$SSH_AUTH_SOCK"; then
|
if test -z "$SSH_AUTH_SOCK"; then
|
||||||
# Restart this script as a child of the GnuPG agent.
|
# Restart this script as a child of the GnuPG agent.
|
||||||
@ -219,17 +207,6 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
desktopManagerHandlesLidAndPower = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Whether the display manager should prevent systemd from handling
|
|
||||||
lid and power events. This is normally handled by the desktop
|
|
||||||
environment's power manager. Turn this off when using a minimal
|
|
||||||
X11 setup without a full power manager.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
session = mkOption {
|
session = mkOption {
|
||||||
default = [];
|
default = [];
|
||||||
example = literalExample
|
example = literalExample
|
||||||
|
Loading…
x
Reference in New Issue
Block a user