nixos/nvidia: assert that gdm.nvidiaWayland needs modesetting

This commit is contained in:
worldofpeace 2019-10-02 20:07:19 -04:00
parent 84e6784aae
commit 9c8181db9b

View file

@ -110,6 +110,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 != "");