fix: amd gpu support

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-02-21 18:50:31 -03:00
parent 5ef391b7b7
commit 3634e47486
2 changed files with 31 additions and 4 deletions

View File

@@ -0,0 +1,30 @@
{ config, pkgs, ... }:
{
imports = [ ];
options.shared.configuration.gpu = { };
config = {
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];
environment = {
variables = {
ROC_ENABLE_PRE_VEGA = "1";
};
systemPackages = with pkgs; [
clinfo
];
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
amdvlk
rocmPackages.clr.icd
];
driSupport = true;
driSupport32Bit = true;
};
};
}

View File

@@ -7,6 +7,7 @@
../../modules/nixos/systems/fonts.nix
# Include the results of the hardware scan.
./hardware-configuration.nix
./gpu-configuration.nix
];
options.shared.configuration = { };
config = {
@@ -81,10 +82,6 @@
wl-clipboard
];
hardware = {
opengl.enable = true;
};
# Enable the X11 windowing system.
services.xserver.enable = true;