feat(amd): add initial amd gpu module

This commit is contained in:
ooks-io 2024-03-31 19:54:24 +13:00
parent ca4181f3d7
commit 9f65c5c4a0
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,29 @@
{ lib, config, pkgs, ... }:
let
cfg = config.systemProfile.amd;
in
{
config = lib.mkIf cfg.enable {
hardware.opengl = {
extraPackages = with pkgs; [
vulkan-tools
vulkan-loader
vulkan-extension-layer
vulkan-validation-layer
amdvlk
mesa
];
extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
};
boot = {
initrd.kernelModules = ["amdgpu"];
kernelModules = ["amdgpu"];
};
environment.systemPackages = [ pkgs.nvtopPackages.amd ];
};
}

View file

@ -13,6 +13,7 @@ in
./gaming
./laptop
./mediaServer
./amd
];
options = {
@ -34,6 +35,9 @@ in
nvidia = {
enable = lib.mkEnableOption "Enable the nvidia profile";
};
amd = {
enable = lib.mkEnableOption "Enable the amd profile";
};
mediaServer = {
enable = lib.mkEnableOption "Enable the mediaServer profile";
};