2023-06-18 00:46:31 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
}: let
|
|
|
|
gpu_pkgs = [pkgs.clinfo pkgs.lshw pkgs.glxinfo pkgs.pciutils pkgs.vulkan-tools];
|
2023-01-13 06:42:21 +00:00
|
|
|
gpu_conf = {
|
|
|
|
# openCL
|
|
|
|
hardware.opengl = {
|
|
|
|
enable = true;
|
2023-06-18 00:46:31 +00:00
|
|
|
extraPackages = let
|
|
|
|
inherit (pkgs) rocm-opencl-icd rocm-opencl-runtime;
|
|
|
|
in [rocm-opencl-icd rocm-opencl-runtime];
|
2023-01-13 06:42:21 +00:00
|
|
|
# Vulkan
|
|
|
|
driSupport = true;
|
|
|
|
driSupport32Bit = true;
|
|
|
|
package = pkgs.mesa.drivers;
|
|
|
|
package32 = pkgs.pkgsi686Linux.mesa.drivers;
|
|
|
|
};
|
2023-02-05 03:27:08 +00:00
|
|
|
environment.systemPackages = gpu_pkgs;
|
2023-01-13 06:42:21 +00:00
|
|
|
};
|
2023-06-18 00:46:31 +00:00
|
|
|
in
|
|
|
|
gpu_conf
|