nix-conf/modules/nixos/hardware/default.nix
2024-07-28 13:20:46 +05:30

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;};
};
};
}