mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-13 06:29:40 +01:00
28 lines
616 B
Nix
28 lines
616 B
Nix
{ config, pkgs, lib, ... }:
|
|
with lib;
|
|
let
|
|
xcfg = config.services.xserver;
|
|
cfg = config.hardware.hp.elitebook.graphics;
|
|
in
|
|
{
|
|
options.hardware.hp.elitebook.graphics = {
|
|
enable = mkOption {
|
|
default = xcfg.enable;
|
|
example = !xcfg.enable;
|
|
description = "Wether to enable iGPU related settings for HP Elitebook laptops";
|
|
type = types.bool;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
boot.initrd.kernelModules = [ "i915" ];
|
|
hardware.opengl = {
|
|
enable = mkDefault true;
|
|
extraPackages = with pkgs; [
|
|
vaapiIntel
|
|
libvdpau-va-gl
|
|
];
|
|
};
|
|
};
|
|
}
|
|
|