reorganize hardware

This commit is contained in:
Reid 2026-04-30 17:15:54 -07:00
parent 0d9381864c
commit 30baa4ce8b
Signed by: reidlab
GPG key ID: DAF5EAF6665839FD
8 changed files with 67 additions and 55 deletions

View file

@ -0,0 +1,24 @@
{ pkgs, config, lib, inputs, ... }:
with lib;
let
cfg = config.modules.hardware.graphics.i915;
in {
options.modules.hardware.graphics.i915 = {
enable = mkEnableOption "Enable Intel i915 graphics drivers, used in conjuction with nixos-hardware";
powersave = mkEnableOption {
default = config.modules.core.laptop;
description = "Enable intel i915-specific powersaving tweaks";
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ intel-gpu-tools ];
hardware.intel-gpu-tools.enable = true;
boot.kernelParams = [
# enable gpu virtualization
"i915.enable_gvt=1"
] ++ optional cfg.powersave "i915.enable_fbc=1";
};
}