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/nvidia.nix
Normal file
41
modules/hardware/nvidia.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
in
|
||||
{
|
||||
options.hardware.nvidia.enable = mkEnableOption "NVIDIA graphics support";
|
||||
|
||||
config = mkIf config.hardware.nvidia.enable {
|
||||
# NVIDIA driver configuration
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
|
||||
# NVIDIA specific packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
libva-utils
|
||||
nvtopPackages.nvidia
|
||||
];
|
||||
|
||||
# Graphics packages for NVIDIA
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
libva-vdpau-driver
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue