about summary refs log tree commit diff
path: root/nixos/modules/services/x11/window-managers/default.nix
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2017-11-05 08:23:57 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2017-11-07 12:18:24 +0100
commit410f0f0db213e3d99119208e3497002caf1f9ade (patch)
tree3c5922ad9c5377204283a357ea74ab44ce1a3113 /nixos/modules/services/x11/window-managers/default.nix
parent5b70c1855b9681cbbe3e7625350ce322a63572b3 (diff)
services.xserver: fix `apply` of default DM/WM
This is needed to pick the first enabled DM/WM
if the default is `none`
Diffstat (limited to 'nixos/modules/services/x11/window-managers/default.nix')
-rw-r--r--nixos/modules/services/x11/window-managers/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix
index d12003768a675..25ba95fccd756 100644
--- a/nixos/modules/services/x11/window-managers/default.nix
+++ b/nixos/modules/services/x11/window-managers/default.nix
@@ -61,7 +61,9 @@ in
         example = "wmii";
         description = "Default window manager loaded if none have been chosen.";
         apply = defaultWM:
-          if any (w: w.name == defaultWM) cfg.session then
+          if defaultWM == "none" && cfg.session != []  then
+            (head cfg.session).name
+          else if any (w: w.name == defaultWM) cfg.session then
             defaultWM
           else
             throw "Default window manager (${defaultWM}) not found.";