This commit is contained in:
parent
dcd34b557c
commit
dd0b3040a4
2 changed files with 28 additions and 0 deletions
27
modules/system/hardware/graphics/amdgpu.nix
Normal file
27
modules/system/hardware/graphics/amdgpu.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./amdgpu.nix
|
||||||
./nvidia.nix
|
./nvidia.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue