reorganize hardware
This commit is contained in:
parent
0d9381864c
commit
eecae7fd24
8 changed files with 76 additions and 54 deletions
27
modules/hardware/graphics/amdgpu.nix
Normal file
27
modules/hardware/graphics/amdgpu.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ pkgs, config, lib, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.hardware.graphics.amdgpu;
|
||||
in {
|
||||
options.modules.hardware.graphics.amdgpu = {
|
||||
enable = mkEnableOption "Enable AMD graphics drivers, used in conjuction with nixos-hardware";
|
||||
overclock = mkEnableOption "Enable overclocking on AMD graphics drivers";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hardware.amdgpu.opencl.enable = true;
|
||||
hardware.amdgpu.overdrive.enable = cfg.overclock;
|
||||
services.lact.enable = cfg.overclock;
|
||||
|
||||
environment.systemPackages = with pkgs; [ amdgpu_top ];
|
||||
|
||||
environment.variables = {
|
||||
# radv > amdvlk
|
||||
AMD_VULKAN_ICD = "RADV";
|
||||
# hwaccel
|
||||
LIBVA_DRIVER_NAME = "radeonsi";
|
||||
VDPAU_DRIVER = "radeonsi";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue