From 44c12dc0ff131653f35fc63e97257bf089082c21 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 1 Sep 2015 12:14:44 +0200 Subject: [PATCH] `desktopManagerHandlesLidAndPower default `false` Changes the option and explicitely sets it for each desktopManager. Reasoning: Currently, services.xserver.displayManager.desktopManagerHandlesLidAndPower is set to true by default. This creates a problem for users without desktop environments activated, since lid management simply doesn't work (and they have to be lucky to find this option). See issue #9671 --- nixos/modules/services/x11/desktop-managers/README | 1 + nixos/modules/services/x11/desktop-managers/e19.nix | 1 + nixos/modules/services/x11/desktop-managers/kde4.nix | 1 + nixos/modules/services/x11/desktop-managers/kde5.nix | 1 + nixos/modules/services/x11/desktop-managers/kodi.nix | 3 ++- nixos/modules/services/x11/desktop-managers/xfce.nix | 1 + nixos/modules/services/x11/display-managers/default.nix | 2 +- 7 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 nixos/modules/services/x11/desktop-managers/README diff --git a/nixos/modules/services/x11/desktop-managers/README b/nixos/modules/services/x11/desktop-managers/README new file mode 100644 index 00000000000..78c75ff7098 --- /dev/null +++ b/nixos/modules/services/x11/desktop-managers/README @@ -0,0 +1 @@ +Each desktop manager should explicitly specify a value for `services.xserver.displayManager.desktopManagerHandlesLidAndPower`. \ No newline at end of file diff --git a/nixos/modules/services/x11/desktop-managers/e19.nix b/nixos/modules/services/x11/desktop-managers/e19.nix index 2d5c7b192bc..74065c862ef 100644 --- a/nixos/modules/services/x11/desktop-managers/e19.nix +++ b/nixos/modules/services/x11/desktop-managers/e19.nix @@ -62,6 +62,7 @@ in waitPID=$! ''; }]; + services.xserver.displayManager.desktopManagerHandlesLidAndPower = true; security.setuidPrograms = [ "e19_freqset" ]; diff --git a/nixos/modules/services/x11/desktop-managers/kde4.nix b/nixos/modules/services/x11/desktop-managers/kde4.nix index 21b6243ba18..7830e984219 100644 --- a/nixos/modules/services/x11/desktop-managers/kde4.nix +++ b/nixos/modules/services/x11/desktop-managers/kde4.nix @@ -111,6 +111,7 @@ in exec ${kde_workspace}/bin/startkde ''; }; + services.xserver.displayManager.desktopManagerHandlesLidAndPower = true; security.setuidOwners = singleton { program = "kcheckpass"; diff --git a/nixos/modules/services/x11/desktop-managers/kde5.nix b/nixos/modules/services/x11/desktop-managers/kde5.nix index 5061d59b7c7..01a8704fea7 100644 --- a/nixos/modules/services/x11/desktop-managers/kde5.nix +++ b/nixos/modules/services/x11/desktop-managers/kde5.nix @@ -78,6 +78,7 @@ in bgSupport = true; start = ''exec ${plasma5.plasma-workspace}/bin/startkde;''; }; + services.xserver.displayManager.desktopManagerHandlesLidAndPower = true; security.setuidOwners = singleton { program = "kcheckpass"; diff --git a/nixos/modules/services/x11/desktop-managers/kodi.nix b/nixos/modules/services/x11/desktop-managers/kodi.nix index 1e30308a513..e6d6efaf3a6 100644 --- a/nixos/modules/services/x11/desktop-managers/kodi.nix +++ b/nixos/modules/services/x11/desktop-managers/kodi.nix @@ -25,7 +25,8 @@ in waitPID=$! ''; }]; + services.xserver.displayManager.desktopManagerHandlesLidAndPower = true; environment.systemPackages = [ pkgs.kodi ]; }; -} \ No newline at end of file +} diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix index 88eefa13de3..746f810a11f 100644 --- a/nixos/modules/services/x11/desktop-managers/xfce.nix +++ b/nixos/modules/services/x11/desktop-managers/xfce.nix @@ -37,6 +37,7 @@ in exec ${pkgs.stdenv.shell} ${pkgs.xfce.xinitrc} ''; }; + services.xserver.displayManager.desktopManagerHandlesLidAndPower = true; environment.systemPackages = [ pkgs.gtk # To get GTK+'s themes. diff --git a/nixos/modules/services/x11/display-managers/default.nix b/nixos/modules/services/x11/display-managers/default.nix index 991043d73c6..98e36954712 100644 --- a/nixos/modules/services/x11/display-managers/default.nix +++ b/nixos/modules/services/x11/display-managers/default.nix @@ -229,7 +229,7 @@ in desktopManagerHandlesLidAndPower = mkOption { type = types.bool; - default = true; + default = false; description = '' Whether the display manager should prevent systemd from handling lid and power events. This is normally handled by the desktop