fix: amd gpu support
This commit is contained in:
30
hosts/desktop/gpu-configuration.nix
Normal file
30
hosts/desktop/gpu-configuration.nix
Normal 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;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user