feat(amd): add initial amd gpu module
This commit is contained in:
parent
ca4181f3d7
commit
9f65c5c4a0
2 changed files with 33 additions and 0 deletions
29
system/profiles/amd/default.nix
Normal file
29
system/profiles/amd/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -13,6 +13,7 @@ in
|
||||||
./gaming
|
./gaming
|
||||||
./laptop
|
./laptop
|
||||||
./mediaServer
|
./mediaServer
|
||||||
|
./amd
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
@ -34,6 +35,9 @@ in
|
||||||
nvidia = {
|
nvidia = {
|
||||||
enable = lib.mkEnableOption "Enable the nvidia profile";
|
enable = lib.mkEnableOption "Enable the nvidia profile";
|
||||||
};
|
};
|
||||||
|
amd = {
|
||||||
|
enable = lib.mkEnableOption "Enable the amd profile";
|
||||||
|
};
|
||||||
mediaServer = {
|
mediaServer = {
|
||||||
enable = lib.mkEnableOption "Enable the mediaServer profile";
|
enable = lib.mkEnableOption "Enable the mediaServer profile";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue