1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-04 18:19:40 +01:00
nixos-hardware/hp/elitebook/2560p/igpu.nix

29 lines
616 B
Nix
Raw Normal View History

2022-01-24 21:15:10 +01:00
{ 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
];
};
};
}