nixos-lib/hardware/intel.nix
Antoine Viallon 4d01393e59
[Hardware/GPUs] Refactor GPU related options
[Hardware/NVidia] Add option to save all VRAM before going to sleep
2022-05-17 09:19:04 +02:00

26 lines
606 B
Nix

{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.aviallon.hardware.intel;
in
{
options.aviallon.hardware.intel = {
enable = mkEnableOption "Intel GPUs";
};
config = mkIf cfg.enable {
boot.initrd.kernelModules = [ "i915" ];
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
# intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl
intel-graphics-compiler
intel-compute-runtime
];
};
};
}