faucet(gui): configure video acceleration
This commit is contained in:
parent
a901f2c503
commit
b9b47f268e
2 changed files with 22 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
in {
|
||||
imports = [
|
||||
./plymouth.nix
|
||||
./va.nix
|
||||
./greetd.nix
|
||||
];
|
||||
|
||||
|
|
21
faucet/gui/va.nix
Normal file
21
faucet/gui/va.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
# https://nixos.wiki/wiki/Accelerated_Video_Playback
|
||||
|
||||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, ... }: with lib; let
|
||||
cfg = config.faucet.gui;
|
||||
in mkIf cfg.enable {
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
};
|
||||
|
||||
hardware.opengl = {
|
||||
extraPackages = with pkgs; optionals ((cfg.type == "intel") || (cfg.type == "prime")) [
|
||||
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
] ++ optional ((cfg.type == "nvidia") || (cfg.type == "prime")) nvidia-vaapi-driver;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue