nixos/modules/system/hardware/graphics/amdgpu.nix
Florian RICHER dd0b3040a4
All checks were successful
check / check (push) Successful in 34s
Add amdgpu [not tested yet]
2025-03-11 21:10:24 +01:00

27 lines
600 B
Nix

{ config, lib, ... }:
with lib;
let
cfg = config.modules.system.hardware.graphics.amdgpu;
in
{
options.modules.system.hardware.graphics.amdgpu = {
enable = mkEnableOption ''
Enable amdgpu with my custom configurations
'';
};
config = mkIf cfg.enable {
boot.initrd.kernelModules = [ "amdgpu" ];
# Load amdgpu driver for Xorg and Wayland
services.xserver = {
enable = true;
videoDrivers = ["amdgpu"];
};
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [ rocmPackages.clr.icd ];
};
};
}