nixos-configs/devices/nos/modules/jellyfin/packages.nix

36 lines
811 B
Nix
Raw Normal View History

{
config,
2024-05-11 23:20:45 -04:00
jellyfin-overlays,
pkgs,
...
}: let
2024-05-11 23:20:45 -04:00
overlays = jellyfin-overlays.legacyPackages.${pkgs.system};
jellyPkgs =
2024-03-03 17:34:21 -05:00
if config.nvidia.enableCUDA
2024-05-11 23:20:45 -04:00
then overlays.cudaPackages.pkgs
else overlays;
jellyWeb = jellyPkgs.jellyfin-web.overrideAttrs (_: o: {
2024-05-11 23:20:45 -04:00
# 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 {
services.jellyfin.package = jellyfinPkg;
environment.systemPackages = [
jellyfinPkg
jellyWeb
jellyPkgs.jellyfin-ffmpeg
];
}