add opengl settings

This commit is contained in:
Aditya 2024-04-12 12:40:00 +05:30
parent 516bc2c900
commit 96af961cbb
Signed by: aditya
SSH key fingerprint: SHA256:jL1IvWsjjlPtw6HvDIHfXfhO9IkIokNEyIfuFhSdoyU

View file

@ -8,15 +8,19 @@
hardware.enable = lib.mkEnableOption "enable hardware options";
};
config = lib.mkIf config.hardware.enable {
environment.sessionVariables = {LIBVA_DRIVER_NAME = "iHD";};
hardware = {
#firmware = with pkgs; [firmwareLinuxNonfree];
opengl = {
enable = true;
extraPackages = with pkgs; [vaapiIntel vaapiVdpau libvdpau-va-gl intel-media-driver];
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [vaapiIntel vaapiVdpau libvdpau-va-gl intel-media-driver intel-vaapi-driver rocm-opencl-icd rocm-opencl-runtime];
};
};
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
intel-vaapi-driver = pkgs.intel-vaapi-driver.override {enableHybridCodec = true;};
};
};
}