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
45
modules/hardware/intel.nix
Normal file
45
modules/hardware/intel.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
in
|
||||
{
|
||||
options.hardware.intel.enable = mkEnableOption "Intel graphics support";
|
||||
|
||||
config = mkIf config.hardware.intel.enable {
|
||||
# Intel driver configuration
|
||||
services.xserver.videoDrivers = [ "modesetting" ];
|
||||
|
||||
# Enable Intel GPU support
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
|
||||
# Intel GPU early loading
|
||||
boot.kernelParams = [ "i915.enable_guc=2" ];
|
||||
|
||||
# Intel specific packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
intel-gpu-tools
|
||||
nvtopPackages.intel
|
||||
];
|
||||
|
||||
# Graphics packages for Intel (already configured in default.nix)
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
intel-media-driver
|
||||
intel-vaapi-driver
|
||||
intel-compute-runtime
|
||||
intel-ocl
|
||||
];
|
||||
|
||||
hardware.graphics.extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
intel-vaapi-driver
|
||||
];
|
||||
|
||||
# Intel GPU power management
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue