From 7c61d6dffc119069db44361dedc075ffc036f87d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 13 Jun 2024 11:17:22 +0000 Subject: [PATCH] nixos: hardware: graphics: use AMDVLK options --- modules/nixos/hardware/graphics/default.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/modules/nixos/hardware/graphics/default.nix b/modules/nixos/hardware/graphics/default.nix index 3baac02..51ac445 100644 --- a/modules/nixos/hardware/graphics/default.nix +++ b/modules/nixos/hardware/graphics/default.nix @@ -35,19 +35,22 @@ in (lib.mkIf (cfg.gpuFlavor == "amd") { boot.initrd.kernelModules = lib.mkIf cfg.amd.enableKernelModule [ "amdgpu" ]; + hardware.amdgpu = { + # Vulkan + amdvlk = lib.mkIf cfg.amd.amdvlk { + enable = true; + support32Bit = { + enable = true; + }; + }; + }; + hardware.opengl = { extraPackages = with pkgs; [ # OpenCL rocmPackages.clr rocmPackages.clr.icd - ] - ++ lib.optional cfg.amd.amdvlk amdvlk - ; - - extraPackages32 = with pkgs; [ - ] - ++ lib.optional cfg.amd.amdvlk driversi686Linux.amdvlk - ; + ]; }; })