fix intel on 2311

This commit is contained in:
Peder Bergebakken Sundt 2024-01-10 23:49:21 +01:00
parent 9c278a7ece
commit e078db73f1
2 changed files with 11 additions and 17 deletions

View File

@ -4,6 +4,7 @@
# https://github.com/NixOS/nixpkgs/blob/nixos-22.11/pkgs/development/libraries/ffmpeg/generic.nix # https://github.com/NixOS/nixpkgs/blob/nixos-22.11/pkgs/development/libraries/ffmpeg/generic.nix
# https://github.com/NixOS/nixpkgs/blob/nixos-22.11/pkgs/development/libraries/jellyfin-ffmpeg/default.nix # https://github.com/NixOS/nixpkgs/blob/nixos-22.11/pkgs/development/libraries/jellyfin-ffmpeg/default.nix
# https://nixos.wiki/wiki/Accelerated_Video_Playback
nixpkgs.config.openglSupport = true; # why is this not set by hardware.opengl.enable ? nixpkgs.config.openglSupport = true; # why is this not set by hardware.opengl.enable ?
nixpkgs.config.vaapiSupport = true; nixpkgs.config.vaapiSupport = true;
@ -11,13 +12,20 @@
nixpkgs.config.vdpauSupport = true; # intel nixpkgs.config.vdpauSupport = true; # intel
nixpkgs.config.libmfxSupport = true; # intel nixpkgs.config.libmfxSupport = true; # intel
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
};
hardware.opengl.enable = true; hardware.opengl.enable = true;
hardware.opengl.driSupport = true; hardware.opengl.driSupport = true;
hardware.opengl.extraPackages = with pkgs; [ hardware.opengl.extraPackages = with pkgs; [
mesa.drivers mesa.drivers
vaapiIntel intel-media-driver
libvdpau-va-gl (if (lib.versionOlder (lib.versions.majorMinor lib.version) "23.11") then vaapiIntel else intel-vaapi-driver)
vaapiVdpau vaapiVdpau
libvdpau-va-gl
intel-ocl intel-ocl
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
]; ];
} }

View File

@ -35,21 +35,7 @@
proxyWebsockets = true; proxyWebsockets = true;
}; };
}; };
# Hardware acceleration
# https://nixos.wiki/wiki/Jellyfin
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
];
};
# Allow Jellyfin access to VAAPI # Allow Jellyfin access to VAAPI
users.users.${config.services.jellyfin.user}.extraGroups = [ "video" "render" ]; users.users.${config.services.jellyfin.user}.extraGroups = [ "video" "render" ];
systemd.services.jellyfin.serviceConfig.PrivateDevices = lib.mkForce false; systemd.services.jellyfin.serviceConfig.PrivateDevices = lib.mkForce false;