diff options
author | Edmund Wu <fangkazuto@gmail.com> | 2018-08-11 11:32:00 -0400 |
---|---|---|
committer | Edmund Wu <fangkazuto@gmail.com> | 2018-10-17 19:30:44 -0400 |
commit | 21bb1fa004aae4d96e38bb14a06c24062118dde0 (patch) | |
tree | 106e715e13372cefc461de29f6289489db9b2c1a /nixos/modules | |
parent | 7131749bee3742b18b0000554676bb3d760976ff (diff) |
nvidia_x11_beta: reinit at 410.57
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/hardware/video/nvidia.nix | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 6944d1a4f76b..f8524ab99e8a 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -1,6 +1,6 @@ # This module provides the proprietary NVIDIA X11 / OpenGL drivers. -{ config, lib, pkgs, pkgs_i686, ... }: +{ stdenv, config, lib, pkgs, pkgs_i686, ... }: with lib; @@ -23,7 +23,11 @@ let else null; nvidia_x11 = nvidiaForKernel config.boot.kernelPackages; - nvidia_libs32 = (nvidiaForKernel pkgs_i686.linuxPackages).override { libsOnly = true; kernel = null; }; + nvidia_libs32 = + if versionOlder nvidia_x11.version "391" then + ((nvidiaForKernel pkgs_i686.linuxPackages).override { libsOnly = true; kernel = null; }).out + else + (nvidiaForKernel config.boot.kernelPackages).lib32; enabled = nvidia_x11 != null; @@ -98,7 +102,7 @@ in assertions = [ { assertion = config.services.xserver.displayManager.gdm.wayland; - message = "NVidia drivers don't support wayland"; + message = "NVIDIA drivers don't support wayland"; } { assertion = !optimusCfg.enable || @@ -161,7 +165,7 @@ in }; hardware.opengl.package = nvidia_x11.out; - hardware.opengl.package32 = nvidia_libs32.out; + hardware.opengl.package32 = nvidia_libs32; environment.systemPackages = [ nvidia_x11.bin nvidia_x11.settings ] ++ lib.filter (p: p != null) [ nvidia_x11.persistenced ]; |