nix-dotfiles/modules/hardware/graphics/i915.nix
2026-04-30 17:19:46 -07:00

24 lines
698 B
Nix

{ 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";
};
}