mirror of
https://git.adityakumar.xyz/nix-conf.git
synced 2024-11-09 23:49:43 +00:00
24 lines
673 B
Nix
24 lines
673 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
options = {
|
|
hardware.enable = lib.mkEnableOption "enable hardware options";
|
|
};
|
|
config = lib.mkIf config.hardware.enable {
|
|
environment.sessionVariables = {LIBVA_DRIVER_NAME = "iHD";};
|
|
hardware = {
|
|
graphics = {
|
|
enable = true;
|
|
enable32Bit = true;
|
|
extraPackages = with pkgs; [vaapiIntel vaapiVdpau libvdpau-va-gl intel-media-driver intel-vaapi-driver];
|
|
};
|
|
};
|
|
nixpkgs.config.packageOverrides = pkgs: {
|
|
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
|
|
intel-vaapi-driver = pkgs.intel-vaapi-driver.override {enableHybridCodec = true;};
|
|
};
|
|
};
|
|
}
|