feat(jellyfin): setup packages correctly with flake
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-05-13 23:10:27 -04:00
parent cefaec73be
commit 4f473a4248
3 changed files with 14 additions and 24 deletions

View file

@ -24,7 +24,8 @@ in {
optionalGroup mainUser
++ optionalGroup "input"
++ optionalGroup "media"
++ optionalGroup "render";
++ optionalGroup "render"
++ optionalGroup "video";
services = {
jellyfin = {
@ -110,8 +111,7 @@ in {
"vp9"
"av1"
];
allowHevcEncoding = true;
allowAv1Encoding = true;
allowHevcEncoding = false;
enableThrottling = false;
enableTonemapping = true;
downMixAudioBoost = 1;

View file

@ -6,28 +6,18 @@
}: let
jellyPkgs =
if config.nvidia.enableCUDA
then jellyfin-flake.packages.${pkgs.system}.cudaPackages // {inherit (pkgs.cudaPackages.pkgs) jellyfin-ffmpeg;}
else jellyfin-flake.packages.${pkgs.system} // {inherit (pkgs) jellyfin-ffmpeg;};
jellyWeb = jellyPkgs.jellyfin-web.overrideAttrs (_: o: {
# TODO: Inject skip intro button for 10.9.0
});
jellyfinPkg = jellyPkgs.jellyfin.overrideAttrs (_: o: {
# This was the only way I found to replace the jellyfin-web package
preInstall = ''
makeWrapperArgs+=(
--add-flags "--ffmpeg ${jellyPkgs.jellyfin-ffmpeg}/bin/ffmpeg"
--add-flags "--webdir ${jellyWeb}/share/jellyfin-web"
)
'';
});
then jellyfin-flake.packages.${pkgs.system}.cudaPackages
else jellyfin-flake.packages.${pkgs.system};
in {
services.jellyfin.package = jellyfinPkg;
services.jellyfin = {
package = jellyPkgs.jellyfin;
webPackage = jellyPkgs.jellyfin-web;
ffmpegPackage = jellyPkgs.jellyfin-ffmpeg;
};
environment.systemPackages = [
jellyfinPkg
jellyWeb
jellyPkgs.jellyfin-ffmpeg
environment.systemPackages = with config.services.jellyfin; [
finalPackage
webPackage
ffmpegPackage
];
}

Binary file not shown.