summary refs log tree commit diff
path: root/nixos/modules/services/x11/display-managers
diff options
context:
space:
mode:
authorDamien Cassou <damien@cassou.me>2015-06-19 11:16:32 +0200
committerDamien Cassou <damien@cassou.me>2015-06-19 11:16:32 +0200
commit26e424a4aa2c4efdedbd68e119728400c99a017b (patch)
tree3d7c34f68d61afc7c09aed69f94240497db65b8b /nixos/modules/services/x11/display-managers
parente1af50c4c4c0332136283e9231f0a32ac11f2b90 (diff)
downloadnixlib-26e424a4aa2c4efdedbd68e119728400c99a017b.tar
nixlib-26e424a4aa2c4efdedbd68e119728400c99a017b.tar.gz
nixlib-26e424a4aa2c4efdedbd68e119728400c99a017b.tar.bz2
nixlib-26e424a4aa2c4efdedbd68e119728400c99a017b.tar.lz
nixlib-26e424a4aa2c4efdedbd68e119728400c99a017b.tar.xz
nixlib-26e424a4aa2c4efdedbd68e119728400c99a017b.tar.zst
nixlib-26e424a4aa2c4efdedbd68e119728400c99a017b.zip
Explanation to desktopManagerHandlesLidAndPower
With this patch, systemd-inhibit outputs a descriptive message when
desktopManagerHandlesLidAndPower=true (the default).

Before the patch:

    $ systemd-inhibit
         Who: /nix/store/[...]-xsession [...] (UID 1000/cassou, PID 18561/systemd-inhibit)
        What: handle-power-key:handle-lid-switch
         Why: Unknown reason
        Mode: block

After the patch:

    $ systemd-inhibit
         Who: /nix/store/[...]-xsession [...] (UID 1000/cassou, PID 18561/systemd-inhibit)
        What: handle-power-key:handle-lid-switch
         Why: See NixOS configuration option 'services.xserver.displayManager.desktopManagerHandlesLidAndPower' for more information.
        Mode: block
Diffstat (limited to 'nixos/modules/services/x11/display-managers')
-rw-r--r--nixos/modules/services/x11/display-managers/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix
index c5012dbb5e30..70a4303d8973 100644
--- a/nixos/modules/services/x11/display-managers/default.nix
+++ b/nixos/modules/services/x11/display-managers/default.nix
@@ -56,7 +56,7 @@ let
         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 "$0" "$sessionType"
+            exec ${config.systemd.package}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key --why="See NixOS configuration option 'services.xserver.displayManager.desktopManagerHandlesLidAndPower' for more information." "$0" "$sessionType"
           fi
         fi