Add amdgpu [not tested yet]
All checks were successful
check / check (push) Successful in 34s

This commit is contained in:
Florian RICHER 2025-03-11 21:10:24 +01:00
parent dcd34b557c
commit dd0b3040a4
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,27 @@
{ 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 ];
};
};
}

View file

@ -2,6 +2,7 @@
{
imports = [
./amdgpu.nix
./nvidia.nix
];
}