summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2016-02-28 08:28:17 +0000
committerDomen Kožar <domen@dev.si>2016-02-28 08:28:17 +0000
commit4c17d3892b34356ba00e15c4ea82cf08c1e7e809 (patch)
tree468fb8d58316bd31ddec52cc7148c2a7c9fbfae0 /nixos/modules
parent3069cab2e70ca782c0ce1cb7f74e46bf191523d1 (diff)
parent85898da27a9141188c11088077f11bdeb759a6ad (diff)
downloadnixlib-4c17d3892b34356ba00e15c4ea82cf08c1e7e809.tar
nixlib-4c17d3892b34356ba00e15c4ea82cf08c1e7e809.tar.gz
nixlib-4c17d3892b34356ba00e15c4ea82cf08c1e7e809.tar.bz2
nixlib-4c17d3892b34356ba00e15c4ea82cf08c1e7e809.tar.lz
nixlib-4c17d3892b34356ba00e15c4ea82cf08c1e7e809.tar.xz
nixlib-4c17d3892b34356ba00e15c4ea82cf08c1e7e809.tar.zst
nixlib-4c17d3892b34356ba00e15c4ea82cf08c1e7e809.zip
Merge pull request #9727 from Profpatsch/dm-lid-management
remove desktopManagerHandlesLidAndPower
Diffstat (limited to 'nixos/modules')
-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 bfe975b162b6..8d7593e8e546 100644
--- a/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -49,18 +49,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.
@@ -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 {
         default = [];
         example = literalExample