2024-12-18 09:40:11 +03:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.module.amd.gpu;
|
|
|
|
in
|
2024-10-11 23:27:07 +03:00
|
|
|
{
|
2024-12-18 09:40:11 +03:00
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
environment.variables.AMD_VULKAN_ICD = "RADV";
|
|
|
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
|
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
|
|
|
hardware.graphics = {
|
|
|
|
enable = true;
|
|
|
|
enable32Bit = true;
|
|
|
|
};
|
2024-06-25 04:04:39 +03:00
|
|
|
|
2024-12-18 09:40:11 +03:00
|
|
|
# AMDVLK was broken for me (huge stuttering). So keep it disabled, at least for now.
|
|
|
|
# hardware.opengl.extraPackages = with pkgs; [
|
|
|
|
# amdvlk
|
|
|
|
# ];
|
|
|
|
# hardware.opengl.extraPackages32 = with pkgs; [
|
|
|
|
# driversi686Linux.amdvlk
|
|
|
|
# ];
|
|
|
|
};
|
2024-03-04 00:34:39 +03:00
|
|
|
}
|