about summary refs log tree commit diff
path: root/nixos/modules/hardware/video/nvidia.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/hardware/video/nvidia.nix')
-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 = ''