add hardware option

This commit is contained in:
Aditya 2024-04-11 11:20:39 +05:30
parent 463b9dff23
commit ea040a6d5e
Signed by: aditya
SSH key fingerprint: SHA256:jL1IvWsjjlPtw6HvDIHfXfhO9IkIokNEyIfuFhSdoyU

View file

@ -1,12 +1,22 @@
{pkgs, ...}: {
hardware = {
#firmware = with pkgs; [firmwareLinuxNonfree];
opengl = {
enable = true;
extraPackages = with pkgs; [vaapiIntel vaapiVdpau libvdpau-va-gl intel-media-driver];
{
config,
lib,
pkgs,
...
}: {
options = {
hardware.enable = lib.mkEnableOption "enable hardware options";
};
config = lib.mkIf config.hardware.enable {
hardware = {
#firmware = with pkgs; [firmwareLinuxNonfree];
opengl = {
enable = true;
extraPackages = with pkgs; [vaapiIntel vaapiVdpau libvdpau-va-gl intel-media-driver];
};
};
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
};
};
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
};
}