diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 209310bec999..2ea0cd69384b 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -13,7 +13,10 @@ let # driver. nvidiaForKernel = kernelPackages: if elem "nvidia" drivers then - kernelPackages.nvidia_x11 + if versionAtLeast kernelPackages.kernel.version "4.0" then + kernelPackages.nvidia_x11_beta + else + kernelPackages.nvidia_x11 else if elem "nvidiaLegacy173" drivers then kernelPackages.nvidia_x11_legacy173 else if elem "nvidiaLegacy304" drivers then diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index 02731d7f7753..f34e593b961b 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -12,6 +12,9 @@ assert (!libsOnly) -> kernel != null; let + # TODO: Remove the use of the beta driver for kernel 4.0 in + # nixos/modules/hardware/video/nvidia.nix when this driver supports + # kernel 4.0 versionNumber = "346.47"; # Policy: use the highest stable version as the default (on our master).