2024-06-24 15:38:28 +00:00
|
|
|
# Enables AMD GPU support.
|
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
cfg = config.aux.system.gpu.amd;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
2024-09-08 15:58:56 +00:00
|
|
|
aux.system.gpu.amd.enable = lib.mkEnableOption "Enables AMD GPU support.";
|
2024-06-24 15:38:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
2024-06-24 17:08:18 +00:00
|
|
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
2024-06-24 15:38:28 +00:00
|
|
|
|
2024-11-18 16:10:20 +00:00
|
|
|
hardware.graphics = {
|
|
|
|
enable = true;
|
2024-06-24 15:38:28 +00:00
|
|
|
# 32-bit application compatibility
|
2024-11-18 16:10:20 +00:00
|
|
|
enable32Bit = true;
|
2024-06-24 15:38:28 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|