feat(modules): hardware modules — intel/amd/nvidia/audio/bluetooth/touchpad
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
0ca8dd3929
commit
620af4f502
8 changed files with 831 additions and 0 deletions
41
modules/hardware/amd.nix
Normal file
41
modules/hardware/amd.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
in
|
||||
{
|
||||
options.hardware.amd.enable = mkEnableOption "AMD graphics support";
|
||||
|
||||
config = mkIf config.hardware.amd.enable {
|
||||
# AMD driver configuration
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
|
||||
# Enable AMD GPU support
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
||||
# AMD specific packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
radeontop
|
||||
nvtopPackages.amd
|
||||
];
|
||||
|
||||
# Graphics packages for AMD
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
rocm-opencl-icd
|
||||
rocm-opencl-runtime
|
||||
];
|
||||
|
||||
hardware.graphics.extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
|
||||
# AMD GPU firmware
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue