2024-04-11 05:50:39 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
options = {
|
|
|
|
hardware.enable = lib.mkEnableOption "enable hardware options";
|
2024-04-10 17:31:45 +00:00
|
|
|
};
|
2024-04-11 05:50:39 +00:00
|
|
|
config = lib.mkIf config.hardware.enable {
|
2024-04-12 07:10:00 +00:00
|
|
|
environment.sessionVariables = {LIBVA_DRIVER_NAME = "iHD";};
|
2024-04-11 05:50:39 +00:00
|
|
|
hardware = {
|
2024-07-28 07:50:46 +00:00
|
|
|
graphics = {
|
2024-04-11 05:50:39 +00:00
|
|
|
enable = true;
|
2024-07-28 07:50:46 +00:00
|
|
|
enable32Bit = true;
|
2024-04-12 07:15:13 +00:00
|
|
|
extraPackages = with pkgs; [vaapiIntel vaapiVdpau libvdpau-va-gl intel-media-driver intel-vaapi-driver];
|
2024-04-11 05:50:39 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
nixpkgs.config.packageOverrides = pkgs: {
|
|
|
|
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
|
2024-04-12 07:10:00 +00:00
|
|
|
intel-vaapi-driver = pkgs.intel-vaapi-driver.override {enableHybridCodec = true;};
|
2024-04-11 05:50:39 +00:00
|
|
|
};
|
2024-04-11 05:08:01 +00:00
|
|
|
};
|
2024-04-10 17:31:45 +00:00
|
|
|
}
|