Revert "Revert "services.xserver: assert that either desktop- or window manager is not "none"""

This reverts commit e64dc25434.
wip/yesman
Maximilian Bosch 7 years ago
parent 316de025d1
commit 5b70c1855b
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E
  1. 8
      nixos/doc/manual/release-notes/rl-1803.xml
  2. 4
      nixos/modules/services/x11/desktop-managers/default.nix
  3. 12
      nixos/modules/services/x11/xserver.nix

@ -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>

@ -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

@ -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 =

Loading…
Cancel
Save