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

View file

@ -6,28 +6,18 @@
}: let }: let
jellyPkgs = jellyPkgs =
if config.nvidia.enableCUDA if config.nvidia.enableCUDA
then jellyfin-flake.packages.${pkgs.system}.cudaPackages // {inherit (pkgs.cudaPackages.pkgs) jellyfin-ffmpeg;} then jellyfin-flake.packages.${pkgs.system}.cudaPackages
else jellyfin-flake.packages.${pkgs.system} // {inherit (pkgs) jellyfin-ffmpeg;}; else jellyfin-flake.packages.${pkgs.system};
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"
)
'';
});
in { in {
services.jellyfin.package = jellyfinPkg; services.jellyfin = {
package = jellyPkgs.jellyfin;
webPackage = jellyPkgs.jellyfin-web;
ffmpegPackage = jellyPkgs.jellyfin-ffmpeg;
};
environment.systemPackages = [ environment.systemPackages = with config.services.jellyfin; [
jellyfinPkg finalPackage
jellyWeb webPackage
jellyPkgs.jellyfin-ffmpeg ffmpegPackage
]; ];
} }

Binary file not shown.