Fix hw acceleration

This commit is contained in:
Dmitriy Holkin 2019-09-17 02:26:38 +04:00
parent 937d877a66
commit 934c40335e

View File

@ -7,10 +7,11 @@ with deviceSpecific; {
hardware.cpu.${devices.${device}.cpu.vendor}.updateMicrocode = true; # Update microcode
hardware.enableRedistributableFirmware = true; # For some unfree drivers
# Enable hardware video acceleration
# Enable hardware video acceleration for Intel
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
boot.initrd.kernelModules = if video == "intel" then [ "iHD" ] else [ ];
hardware.opengl = {
enable = true;
driSupport = true;
@ -22,6 +23,10 @@ with deviceSpecific; {
pkgs.intel-media-driver
] else [ ];
};
environment.sessionVariables = {
GST_VAAPI_ALL_DRIVERS = "1";
LIBVA_DRIVER_NAME = "iHD";
};
hardware.bluetooth.enable = isLaptop;