2024-01-24 00:43:03 +01:00
|
|
|
{ pkgs, config, lib, gpuType, ... }:
|
2024-01-18 05:33:57 +01:00
|
|
|
|
2024-01-24 00:43:03 +01:00
|
|
|
lib.mkIf ("${gpuType}" == "amd") {
|
2024-01-28 09:12:50 +01:00
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
|
|
|
];
|
|
|
|
services.xserver.enable = true;
|
|
|
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
2024-01-18 05:33:57 +01:00
|
|
|
# OpenGL
|
|
|
|
hardware.opengl = {
|
2024-01-21 05:23:17 +01:00
|
|
|
## amdvlk: an open-source Vulkan driver from AMD
|
|
|
|
extraPackages = [ pkgs.amdvlk ];
|
|
|
|
extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
|
2024-01-18 05:33:57 +01:00
|
|
|
};
|
|
|
|
}
|