44 lines
1 KiB
Nix
44 lines
1 KiB
Nix
{ config
|
|
, lib
|
|
, pkgs
|
|
, ...
|
|
}: {
|
|
boot = {
|
|
initrd.availableKernelModules = [ "amdgpu" ];
|
|
kernelModules = [ "amdgpu" ];
|
|
# kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" ];
|
|
};
|
|
|
|
programs.corectrl = {
|
|
enable = true;
|
|
gpuOverclock.enable = true;
|
|
};
|
|
|
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
|
#services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ];
|
|
|
|
systemd.tmpfiles.rules = [
|
|
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
|
];
|
|
hardware.opengl = {
|
|
driSupport = true;
|
|
driSupport32Bit = true;
|
|
extraPackages = with pkgs; [
|
|
amdvlk
|
|
rocmPackages.rocm-runtime
|
|
rocm-opencl-icd
|
|
rocm-opencl-runtime
|
|
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
|
|
];
|
|
extraPackages32 = with pkgs; [
|
|
driversi686Linux.amdvlk
|
|
driversi686Linux.vaapiVdpau
|
|
driversi686Linux.libvdpau-va-gl
|
|
];
|
|
};
|
|
}
|