nix/os-mods/amdgpu/default.nix

58 lines
1.3 KiB
Nix
Raw Normal View History

{ config
, lib
, pkgs
, ...
}: {
boot = {
initrd.availableKernelModules = [ "amdgpu" ];
kernelModules = [ "amdgpu" ];
# kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" ];
};
programs.corectrl = {
enable = true;
gpuOverclock.enable = true;
};
2023-12-11 01:02:18 +01:00
# services.xserver.videoDrivers = [ "amdgpu" ];
services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
2023-12-10 21:51:02 +01:00
systemd.tmpfiles.rules = [
2024-02-02 16:13:55 +01:00
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
hardware.opengl = {
driSupport = true;
driSupport32Bit = true;
2024-02-02 16:13:55 +01:00
extraPackages = with pkgs; [
amdvlk
2023-12-10 21:51:02 +01:00
rocmPackages.rocm-runtime
rocmPackages.llvm.clang
rocm-opencl-icd
rocm-opencl-runtime
2023-12-10 21:51:02 +01:00
vaapiVdpau
libvdpau-va-gl
# libva1
obs-studio-plugins.obs-vaapi # TODO check if obs is enabled
gst_all_1.gstreamer
gst_all_1.gst-vaapi
];
2024-02-02 16:13:55 +01:00
extraPackages32 = with pkgs; [
2023-12-10 21:51:02 +01:00
driversi686Linux.amdvlk
driversi686Linux.vaapiVdpau
driversi686Linux.libvdpau-va-gl
];
};
2023-12-11 01:02:18 +01:00
# Force radv
environment.variables.AMD_VULKAN_ICD = "RADV";
2024-02-02 16:13:55 +01:00
environment.systemPackages = with pkgs; [
vulkan-tools
libva-utils
2024-02-27 17:58:25 +01:00
glxinfo # TODO right place here or in desktop ?
clinfo
wayland-utils # TODO move somewhere better ?
# nixgl.nixGLIntel
# nixgl.nixVulkanIntel
];
}