diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2017-10-17 19:58:22 +0200 |
---|---|---|
committer | Nicolas B. Pierron <nicolas.b.pierron@gmail.com> | 2017-11-04 15:30:20 +0100 |
commit | 93c54acf97077567e8d6135a36f191e872b26692 (patch) | |
tree | e6cd2c188f8e0d45f435f3518b3e75ea560b6caa /nixos | |
parent | 84ad480e0c2b7d65b66cb9551f8985f159d3fe38 (diff) |
services.xserver: assert that either desktop- or window manager is not "none"
resolves #11064
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/release-notes/rl-1803.xml | 8 | ||||
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/default.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 12 |
3 files changed, 22 insertions, 2 deletions
diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml index 17b385242f6fe..fe776c3df2262 100644 --- a/nixos/doc/manual/release-notes/rl-1803.xml +++ b/nixos/doc/manual/release-notes/rl-1803.xml @@ -90,6 +90,14 @@ following incompatible changes:</para> That means that old configuration is not overwritten by default when update to the znc options are made. </para> </listitem> + <listitem> + <para> + The option <option>services.xserver.desktopManager.default</option> is now <literal>none</literal> by default. + An assertion failure is thrown if WM's and DM's default are <literal>none</literal>. + To explicitly run a plain X session without and DM or WM, the newly introduced option <option>services.xserver.plainX</option> + must be set to true. + </para> + </listitem> </itemizedlist> </section> diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix index 13f339e3fbf34..b393167ae2c60 100644 --- a/nixos/modules/services/x11/desktop-managers/default.nix +++ b/nixos/modules/services/x11/desktop-managers/default.nix @@ -87,8 +87,8 @@ in default = mkOption { type = types.str; - default = ""; - example = "none"; + default = "none"; + example = "plasma5"; description = "Default desktop manager loaded if none have been chosen."; apply = defaultDM: if defaultDM == "" && cfg.session.list != [] then diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index d4fe475690ce9..58dc75bcb4e6c 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -161,6 +161,15 @@ 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; @@ -552,6 +561,9 @@ 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`."; + } ]; environment.etc = |