Fix hw acceleration
This commit is contained in:
parent
937d877a66
commit
934c40335e
@ -7,10 +7,11 @@ with deviceSpecific; {
|
|||||||
hardware.cpu.${devices.${device}.cpu.vendor}.updateMicrocode = true; # Update microcode
|
hardware.cpu.${devices.${device}.cpu.vendor}.updateMicrocode = true; # Update microcode
|
||||||
hardware.enableRedistributableFirmware = true; # For some unfree drivers
|
hardware.enableRedistributableFirmware = true; # For some unfree drivers
|
||||||
|
|
||||||
# Enable hardware video acceleration
|
# Enable hardware video acceleration for Intel
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||||
};
|
};
|
||||||
|
boot.initrd.kernelModules = if video == "intel" then [ "iHD" ] else [ ];
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
driSupport = true;
|
driSupport = true;
|
||||||
@ -22,6 +23,10 @@ with deviceSpecific; {
|
|||||||
pkgs.intel-media-driver
|
pkgs.intel-media-driver
|
||||||
] else [ ];
|
] else [ ];
|
||||||
};
|
};
|
||||||
|
environment.sessionVariables = {
|
||||||
|
GST_VAAPI_ALL_DRIVERS = "1";
|
||||||
|
LIBVA_DRIVER_NAME = "iHD";
|
||||||
|
};
|
||||||
|
|
||||||
hardware.bluetooth.enable = isLaptop;
|
hardware.bluetooth.enable = isLaptop;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user