about summary refs log tree commit diff
path: root/nixos/modules/services/x11/display-managers/default.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2015-09-08 18:12:17 +0200
committerProfpatsch <mail@profpatsch.de>2015-09-08 18:12:17 +0200
commit85898da27a9141188c11088077f11bdeb759a6ad (patch)
treece5ddf350822029da164ddb78c4834677d6f9898 /nixos/modules/services/x11/display-managers/default.nix
parent57c33c1c54dba43c52b0e2d488dd4a77b3a896e2 (diff)
downloadnixlib-85898da27a9141188c11088077f11bdeb759a6ad.tar
nixlib-85898da27a9141188c11088077f11bdeb759a6ad.tar.gz
nixlib-85898da27a9141188c11088077f11bdeb759a6ad.tar.bz2
nixlib-85898da27a9141188c11088077f11bdeb759a6ad.tar.lz
nixlib-85898da27a9141188c11088077f11bdeb759a6ad.tar.xz
nixlib-85898da27a9141188c11088077f11bdeb759a6ad.tar.zst
nixlib-85898da27a9141188c11088077f11bdeb759a6ad.zip
Remove desktopManagerHandlesLidAndPower
As discussed on https://github.com/NixOS/nixpkgs/pull/9642, the option
is not necessary because all desktop managers already stopped handling
it (and delegated to systemd).
Diffstat (limited to 'nixos/modules/services/x11/display-managers/default.nix')
-rw-r--r--nixos/modules/services/x11/display-managers/default.nix23
1 files changed, 0 insertions, 23 deletions
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix
index fc0803f2acaf..d73a99bfe589 100644
--- a/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -56,18 +56,6 @@ let
         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 ''
         if test -z "$SSH_AUTH_SOCK"; then
             # Restart this script as a child of the GnuPG agent.
@@ -227,17 +215,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 {
         default = [];
         example = literalExample