2024-03-01 21:36:57 -05:00
|
|
|
{
|
2024-03-02 23:36:07 -05:00
|
|
|
config,
|
2024-05-11 23:20:45 -04:00
|
|
|
jellyfin-overlays,
|
2024-03-02 23:36:07 -05:00
|
|
|
pkgs,
|
2024-03-01 21:36:57 -05:00
|
|
|
...
|
|
|
|
}: let
|
2024-05-11 23:20:45 -04:00
|
|
|
overlays = jellyfin-overlays.legacyPackages.${pkgs.system};
|
2024-03-02 23:36:07 -05:00
|
|
|
|
|
|
|
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;
|
2024-03-08 14:36:52 -05:00
|
|
|
|
|
|
|
jellyWeb = jellyPkgs.jellyfin-web.overrideAttrs (_: o: {
|
2024-05-11 23:20:45 -04:00
|
|
|
# TODO: Inject skip intro button for 10.9.0
|
2024-03-08 14:36:52 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
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"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
});
|
2024-03-01 21:36:57 -05:00
|
|
|
in {
|
2024-03-08 14:36:52 -05:00
|
|
|
services.jellyfin.package = jellyfinPkg;
|
2024-03-02 23:36:07 -05:00
|
|
|
|
2024-03-01 21:36:57 -05:00
|
|
|
environment.systemPackages = [
|
2024-03-08 14:36:52 -05:00
|
|
|
jellyfinPkg
|
|
|
|
jellyWeb
|
2024-03-02 23:36:07 -05:00
|
|
|
jellyPkgs.jellyfin-ffmpeg
|
2024-03-01 21:36:57 -05:00
|
|
|
];
|
|
|
|
}
|