zaneyos/config/system/amd-gpu.nix
2024-01-28 02:12:50 -06:00

16 lines
449 B
Nix

{ pkgs, config, lib, gpuType, ... }:
lib.mkIf ("${gpuType}" == "amd") {
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 ];
};
}