From 5aede8251cd5856b27899243bce0afcf53f9907e Mon Sep 17 00:00:00 2001 From: Mark Nipper Date: Tue, 11 Feb 2025 10:22:27 -0800 Subject: Add nvidia-patch only if it exists --- hosts/arrakis/hardware-configuration.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hosts/arrakis/hardware-configuration.nix b/hosts/arrakis/hardware-configuration.nix index 06bd803..532a673 100644 --- a/hosts/arrakis/hardware-configuration.nix +++ b/hosts/arrakis/hardware-configuration.nix @@ -57,11 +57,12 @@ extraPackages32 = with pkgs.pkgsi686Linux; [ nvidia-vaapi-driver ]; }; - nvidia = { + nvidia = let + video = config.boot.kernelPackages.nvidiaPackages.beta; + in { modesetting.enable = true; open = true; - #package = pkgs.nvidia-patch.patch-nvenc (pkgs.nvidia-patch.patch-fbc config.boot.kernelPackages.nvidiaPackages.beta); - package = config.boot.kernelPackages.nvidiaPackages.beta; + package = if builtins.hasAttr video.version pkgs.nvidia-patch-list.fbc then pkgs.nvidia-patch.patch-nvenc (pkgs.nvidia-patch.patch-fbc config.boot.kernelPackages.nvidiaPackages.beta) else video; }; printers = let -- cgit v1.2.3