nyx/modules/nixos/hardware/gpu/amd.nix

25 lines
447 B
Nix
Raw Permalink Normal View History

2025-01-12 17:18:13 +00:00
{
lib,
pkgs,
config,
...
}: let
inherit (lib.modules) mkIf;
inherit (config.olympus) device;
in {
config = mkIf (device.gpu == "amd") {
services.xserver.videoDrivers = ["amdgpu"];
boot = {
kernelModules = ["amdgpu"];
initrd.kernelModules = ["amdgpu"];
};
# enables AMDVLK & OpenCL support
hardware.graphics.extraPackages = [
pkgs.rocmPackages.clr
pkgs.rocmPackages.clr.icd
];
};
}