1
0
Fork 0
nix-configuration/modules/system/gpu/amd.nix

28 lines
558 B
Nix
Raw Normal View History

# Enables AMD GPU support.
{
pkgs,
config,
lib,
...
}:
let
cfg = config.aux.system.gpu.amd;
in
{
options = {
aux.system.gpu.amd.enable = lib.mkEnableOption (lib.mdDoc "Enables AMD GPU support.");
};
config = lib.mkIf cfg.enable {
boot.initrd.kernelModules = [ "amdgpu" ];
2024-06-24 17:08:18 +00:00
services.xserver.videoDrivers = [ "amdgpu" ];
2024-06-24 16:24:21 +00:00
hardware.graphics = {
extraPackages = [ pkgs.amdvlk ];
# 32-bit application compatibility
2024-06-24 16:24:21 +00:00
enable32Bit = true;
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
};
};
}