Set up vdpau.

This commit is contained in:
Tom Alexander
2025-02-08 16:06:57 -05:00
parent 24d83e95a5
commit 502e18fdec
4 changed files with 61 additions and 1 deletions

View File

@@ -37,6 +37,11 @@
xorg.xeyes # to test which windows are using x11
];
hardware.graphics.enable = true;
# hardware.graphics.enable32Bit = true;
# Vulkan Support (64-bit is enabled by default, 32-bit is disabled by default)
# hardware.opengl.driSupport = true; # This is already enabled by default
# hardware.opengl.driSupport32Bit = true; # For 32 bit applications
})
]
);

View File

@@ -17,6 +17,8 @@ let
buildCommand = "${old.buildCommand}\n patchShebangs $out";
});
kernel_version_check = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.12";
nixos_version_check = lib.versionAtLeast (lib.versions.majorMinor lib.version) "25.05";
in
{
imports = [ ];
@@ -35,6 +37,8 @@ in
{
environment.systemPackages = with pkgs; [
ffmpeg
libva-utils # for vainfo
vdpauinfo
];
}
(lib.mkIf config.me.graphical {
@@ -59,6 +63,21 @@ in
cast_file_vaapi
];
})
(lib.mkIf (config.me.graphics_card_type == "amd") {
environment.sessionVariables = {
VDPAU_DRIVER = "radeonsi";
};
})
(lib.mkIf (config.me.graphics_card_type == "intel") {
hardware.graphics.extraPackages = with pkgs; [
intel-media-driver
libvdpau-va-gl # Support vdpau applications using va-api
];
environment.sessionVariables = {
VDPAU_DRIVER = "va_gl";
};
})
]
);
}