diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2018-03-17 20:34:10 +0100 |
---|---|---|
committer | Herwig Hochleitner <herwig@bendlas.net> | 2018-03-28 20:34:05 +0200 |
commit | 5caa22fe0a908ede1889d32fa773b9aef675a56e (patch) | |
tree | c2a11f93c787dbd5f6fbecbe68742c35113a96c3 /nixos/modules/services/x11 | |
parent | 6e8a13f7e5c0fb4d1791eb0f44fa013cb39a1035 (diff) | |
download | nixlib-5caa22fe0a908ede1889d32fa773b9aef675a56e.tar nixlib-5caa22fe0a908ede1889d32fa773b9aef675a56e.tar.gz nixlib-5caa22fe0a908ede1889d32fa773b9aef675a56e.tar.bz2 nixlib-5caa22fe0a908ede1889d32fa773b9aef675a56e.tar.lz nixlib-5caa22fe0a908ede1889d32fa773b9aef675a56e.tar.xz nixlib-5caa22fe0a908ede1889d32fa773b9aef675a56e.tar.zst nixlib-5caa22fe0a908ede1889d32fa773b9aef675a56e.zip |
Revert restrictive validation behavior for DM/WM defaults in the X module
The original idea behind this change (described in ticket #11064) was to improve the assertions to avoid that users of the X server accidentally forget to configure a DM or WM. However this caused several issues with setups that require X, but no DM or WM. The keymap testcases became instable as well as now disabling DMs needs to be done explicitly. (see https://github.com/NixOS/nixpkgs/pull/31268#issuecomment-347080036) In the end the idea behind the change and #11064 was obviously a mistake, so reverting it completely for now should be fine.
Diffstat (limited to 'nixos/modules/services/x11')
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/default.nix | 6 | ||||
-rw-r--r-- | nixos/modules/services/x11/window-managers/default.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 14 |
3 files changed, 4 insertions, 20 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix index 4622c7b760f0..f435e85f6b83 100644 --- a/nixos/modules/services/x11/desktop-managers/default.nix +++ b/nixos/modules/services/x11/desktop-managers/default.nix @@ -87,11 +87,11 @@ in default = mkOption { type = types.str; - default = "none"; - example = "plasma5"; + default = ""; + example = "none"; description = "Default desktop manager loaded if none have been chosen."; apply = defaultDM: - if defaultDM == "none" && cfg.session.list != [] then + if defaultDM == "" && cfg.session.list != [] then (head cfg.session.list).name else if any (w: w.name == defaultDM) cfg.session.list then defaultDM diff --git a/nixos/modules/services/x11/window-managers/default.nix b/nixos/modules/services/x11/window-managers/default.nix index bc420831ad83..e617e55a7a57 100644 --- a/nixos/modules/services/x11/window-managers/default.nix +++ b/nixos/modules/services/x11/window-managers/default.nix @@ -62,9 +62,7 @@ in example = "wmii"; description = "Default window manager loaded if none have been chosen."; apply = defaultWM: - if defaultWM == "none" && cfg.session != [] then - (head cfg.session).name - else if any (w: w.name == defaultWM) cfg.session then + if any (w: w.name == defaultWM) cfg.session then defaultWM else throw "Default window manager (${defaultWM}) not found."; diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index f96d3c5afbac..e7918cf9d315 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -161,15 +161,6 @@ in ''; }; - plainX = mkOption { - type = types.bool; - default = false; - description = '' - Whether the X11 session can be plain (without DM/WM) and - the Xsession script will be used as fallback or not. - ''; - }; - autorun = mkOption { type = types.bool; default = true; @@ -561,11 +552,6 @@ in + "${toString (length primaryHeads)} heads set to primary: " + concatMapStringsSep ", " (x: x.output) primaryHeads; }) - { assertion = cfg.desktopManager.default == "none" && cfg.windowManager.default == "none" -> cfg.plainX; - message = "Either the desktop manager or the window manager shouldn't be `none`! " - + "To explicitly allow this, you can also set `services.xserver.plainX` to `true`. " - + "The `default` value looks for enabled WMs/DMs and select the first one."; - } ]; environment.etc = |