nix/os-mods/amdgpu/default.nix
2024-05-03 22:40:09 +02:00

50 lines
1.3 KiB
Nix

{ config
, lib
, pkgs
, inputs
, ...
}: {
programs.corectrl = {
enable = true;
gpuOverclock.enable = true;
};
systemd.tmpfiles.rules = [
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
"L+ /opt/rocm/rocblas - - - - ${pkgs.rocmPackages.rocblas}"
"L+ /opt/rocm/hipblas - - - - ${pkgs.rocmPackages.hipblas}"
"L+ /opt/rocm/clang - - - - ${pkgs.rocmPackages.llvm.clang}"
"L+ /opt/rocm/runtime - - - - ${pkgs.rocmPackages.rocm-runtime}"
];
hardware = {
opengl = {
extraPackages = with pkgs; [
vaapiVdpau
libvdpau-va-gl
obs-studio-plugins.obs-vaapi # TODO check if obs is enabled
gst_all_1.gstreamer
gst_all_1.gst-vaapi
];
extraPackages32 = with pkgs; [
driversi686Linux.vaapiVdpau
driversi686Linux.libvdpau-va-gl
];
};
};
# Force radv
environment.variables.AMD_VULKAN_ICD = "RADV";
environment.systemPackages = with pkgs; [
## MONITORING TOOLS ##
nvtopPackages.amd # for AMD GPUs
vulkan-tools
libva-utils
glxinfo # TODO right place here or in desktop ?
clinfo
wayland-utils # TODO move somewhere better ?
# nixgl.nixGLIntel
# nixgl.nixVulkanIntel
];
}