nixos-greynix/nixosModules/intel-gpu.nix

23 lines
676 B
Nix
Raw Normal View History

2025-01-16 05:47:58 +08:00
{ config, pkgs, lib, ... }:
# for Accelerated Video Playback
# https://wiki.nixos.org/wiki/Accelerated_Video_Playback
{
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD
2025-01-16 06:08:34 +08:00
intel-vaapi-driver # For older processors. LIBVA_DRIVER_NAME=i965, works better for firefox/chromium?
2025-01-16 05:47:58 +08:00
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # Optionally, set the environment variable
}
2025-01-16 06:08:34 +08:00
# for Quick Sync Video
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
vpl-gpu-rt # or intel-media-sdk for QSV
];
};