24 lines
703 B
Nix
24 lines
703 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.i915.powersave "i915.enable_fbc=1";
|
|
};
|
|
}
|