mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
services.xserver: assert that either desktop- or window manager is not "none"
resolves #11064
This commit is contained in:
parent
84ad480e0c
commit
93c54acf97
@ -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.
|
That means that old configuration is not overwritten by default when update to the znc options are made.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</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>
|
</itemizedlist>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@ -87,8 +87,8 @@ in
|
|||||||
|
|
||||||
default = mkOption {
|
default = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "";
|
default = "none";
|
||||||
example = "none";
|
example = "plasma5";
|
||||||
description = "Default desktop manager loaded if none have been chosen.";
|
description = "Default desktop manager loaded if none have been chosen.";
|
||||||
apply = defaultDM:
|
apply = defaultDM:
|
||||||
if defaultDM == "" && cfg.session.list != [] then
|
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 {
|
autorun = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
@ -552,6 +561,9 @@ in
|
|||||||
+ "${toString (length primaryHeads)} heads set to primary: "
|
+ "${toString (length primaryHeads)} heads set to primary: "
|
||||||
+ concatMapStringsSep ", " (x: x.output) primaryHeads;
|
+ 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 =
|
environment.etc =
|
||||||
|
Loading…
Reference in New Issue
Block a user