nix/os-mods/amdgpu/default.nix

50 lines
1.1 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 = [
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
];
hardware.opengl = {
driSupport = true;
driSupport32Bit = true;
2023-12-11 01:02:18 +01:00
extraPackages = with pkgs.unstable-os; [
amdvlk
2023-12-10 21:51:02 +01:00
rocmPackages.rocm-runtime
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
2023-12-11 01:02:18 +01:00
vulkan-tools
libva-utils
2023-12-10 21:51:02 +01:00
];
2023-12-11 01:02:18 +01:00
extraPackages32 = with pkgs.unstable-os; [
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";
}