about summary refs log tree commit diff
path: root/nixos/modules/hardware
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2019-10-02 20:07:19 -0400
committerworldofpeace <worldofpeace@protonmail.ch>2019-11-19 15:34:39 -0500
commit9c8181db9be6c99639c797c1ad9e145e8e766f04 (patch)
tree0d6fa78744be454739bd1937642f6dc8e0ad58e8 /nixos/modules/hardware
parent84e6784aaed60fe10d322fa50ad9a44339a9e9e0 (diff)
downloadnixlib-9c8181db9be6c99639c797c1ad9e145e8e766f04.tar
nixlib-9c8181db9be6c99639c797c1ad9e145e8e766f04.tar.gz
nixlib-9c8181db9be6c99639c797c1ad9e145e8e766f04.tar.bz2
nixlib-9c8181db9be6c99639c797c1ad9e145e8e766f04.tar.lz
nixlib-9c8181db9be6c99639c797c1ad9e145e8e766f04.tar.xz
nixlib-9c8181db9be6c99639c797c1ad9e145e8e766f04.tar.zst
nixlib-9c8181db9be6c99639c797c1ad9e145e8e766f04.zip
nixos/nvidia: assert that gdm.nvidiaWayland needs modesetting
Diffstat (limited to 'nixos/modules/hardware')
-rw-r--r--nixos/modules/hardware/video/nvidia.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix
index c35897e2f605..fcb30187fa2f 100644
--- a/nixos/modules/hardware/video/nvidia.nix
+++ b/nixos/modules/hardware/video/nvidia.nix
@@ -111,6 +111,11 @@ in
   config = mkIf enabled {
     assertions = [
       {
+        assertion = with config.services.xserver.displayManager; gdm.nvidiaWayland -> cfg.modesetting.enable;
+        message = "You cannot use wayland with GDM without modesetting enabled for NVIDIA drivers, set `hardware.nvidia.modesetting.enable = true`";
+      }
+
+      {
         assertion = !optimusCfg.enable ||
           (optimusCfg.nvidiaBusId != "" && optimusCfg.intelBusId != "");
         message = ''