nixos: hardware: graphics: use AMDVLK options

This commit is contained in:
Bruno BELANYI 2024-06-13 11:17:22 +00:00
parent 64331981d0
commit 7c61d6dffc

View file

@ -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
;
];
};
})