Skip to content

Commit 85898da

Browse files
committed
Remove desktopManagerHandlesLidAndPower
As discussed on #9642, the option is not necessary because all desktop managers already stopped handling it (and delegated to systemd).
1 parent 57c33c1 commit 85898da

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

nixos/modules/services/x11/display-managers/default.nix

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,6 @@ let
5656
fi
5757
''}
5858
59-
${optionalString cfg.displayManager.desktopManagerHandlesLidAndPower ''
60-
# Stop systemd from handling the power button and lid switch,
61-
# since presumably the desktop environment will handle these.
62-
if [ -z "$_INHIBITION_LOCK_TAKEN" ]; then
63-
export _INHIBITION_LOCK_TAKEN=1
64-
if ! ${config.systemd.package}/bin/loginctl show-session $XDG_SESSION_ID | grep -q '^RemoteHost='; then
65-
exec ${config.systemd.package}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key --why="Desktop environment handles power events" "$0" "$sessionType"
66-
fi
67-
fi
68-
69-
''}
70-
7159
${optionalString cfg.startGnuPGAgent ''
7260
if test -z "$SSH_AUTH_SOCK"; then
7361
# Restart this script as a child of the GnuPG agent.
@@ -227,17 +215,6 @@ in
227215
'';
228216
};
229217

230-
desktopManagerHandlesLidAndPower = mkOption {
231-
type = types.bool;
232-
default = false;
233-
description = ''
234-
Whether the display manager should prevent systemd from handling
235-
lid and power events. This is normally handled by the desktop
236-
environment's power manager. Turn this off when using a minimal
237-
X11 setup without a full power manager.
238-
'';
239-
};
240-
241218
session = mkOption {
242219
default = [];
243220
example = literalExample

0 commit comments

Comments
 (0)