zaneyos/config/system/amd-gpu.nix

16 lines
449 B
Nix
Raw Normal View History

{ pkgs, config, lib, gpuType, ... }:
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" ];
# OpenGL
hardware.opengl = {
## amdvlk: an open-source Vulkan driver from AMD
extraPackages = [ pkgs.amdvlk ];
extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
};
}