32 lines
521 B
Nix
32 lines
521 B
Nix
|
{
|
||
|
lib,
|
||
|
pkgs,
|
||
|
config,
|
||
|
...
|
||
|
}:
|
||
|
with lib;
|
||
|
let
|
||
|
cfg = config.drivers.intel;
|
||
|
in
|
||
|
{
|
||
|
options.drivers.intel = {
|
||
|
enable = mkEnableOption "Enable Intel Graphics Drivers";
|
||
|
};
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
nixpkgs.config.packageOverrides = pkgs: {
|
||
|
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||
|
};
|
||
|
|
||
|
# OpenGL
|
||
|
hardware.opengl = {
|
||
|
extraPackages = with pkgs; [
|
||
|
intel-media-driver
|
||
|
vaapiIntel
|
||
|
vaapiVdpau
|
||
|
libvdpau-va-gl
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
}
|