nixos/nvidia: check modesetting for gdm-wayland only when gdm is enabled

Reported in https://github.com/NixOS/nixpkgs/pull/147153#issuecomment-982695772
This commit is contained in:
Jan Tojnar 2021-11-30 16:06:21 +01:00
parent 365b448d0e
commit dad4fddd52

View file

@ -179,7 +179,7 @@ in
in mkIf enabled {
assertions = [
{
assertion = with config.services.xserver.displayManager; gdm.nvidiaWayland -> cfg.modesetting.enable;
assertion = with config.services.xserver.displayManager; (gdm.enable && gdm.nvidiaWayland) -> cfg.modesetting.enable;
message = "You cannot use wayland with GDM without modesetting enabled for NVIDIA drivers, set `hardware.nvidia.modesetting.enable = true`";
}