diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2017-11-05 07:32:56 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2017-11-05 07:32:56 +0100 |
commit | 5b70c1855b9681cbbe3e7625350ce322a63572b3 (patch) | |
tree | e587b576bf813a9c42878296959870b0eb73c9f2 /nixos/modules | |
parent | 316de025d1cd2d12c0a2a6b8b61b8a70a293fe9b (diff) | |
download | nixlib-5b70c1855b9681cbbe3e7625350ce322a63572b3.tar nixlib-5b70c1855b9681cbbe3e7625350ce322a63572b3.tar.gz nixlib-5b70c1855b9681cbbe3e7625350ce322a63572b3.tar.bz2 nixlib-5b70c1855b9681cbbe3e7625350ce322a63572b3.tar.lz nixlib-5b70c1855b9681cbbe3e7625350ce322a63572b3.tar.xz nixlib-5b70c1855b9681cbbe3e7625350ce322a63572b3.tar.zst nixlib-5b70c1855b9681cbbe3e7625350ce322a63572b3.zip |
Revert "Revert "services.xserver: assert that either desktop- or window manager is not "none"""
This reverts commit e64dc2543458b52abcd913bad87851f5d7db435d.
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/default.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/default.nix b/nixos/modules/services/x11/desktop-managers/default.nix index 13f339e3fbf3..b393167ae2c6 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 d4fe475690ce..58dc75bcb4e6 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 = |