2024-03-01 21:36:57 -05:00
|
|
|
{
|
2024-03-02 23:36:07 -05:00
|
|
|
config,
|
2024-05-12 22:08:26 -04:00
|
|
|
jellyfin-flake,
|
2024-03-02 23:36:07 -05:00
|
|
|
pkgs,
|
2024-03-01 21:36:57 -05:00
|
|
|
...
|
|
|
|
}: let
|
2024-03-02 23:36:07 -05:00
|
|
|
jellyPkgs =
|
2024-03-03 17:34:21 -05:00
|
|
|
if config.nvidia.enableCUDA
|
2024-05-13 23:10:27 -04:00
|
|
|
then jellyfin-flake.packages.${pkgs.system}.cudaPackages
|
|
|
|
else jellyfin-flake.packages.${pkgs.system};
|
2024-03-01 21:36:57 -05:00
|
|
|
in {
|
2024-05-13 23:10:27 -04:00
|
|
|
services.jellyfin = {
|
|
|
|
package = jellyPkgs.jellyfin;
|
2024-05-26 15:48:19 -04:00
|
|
|
webPackage = jellyPkgs.jellyfin-web.overrideAttrs {
|
|
|
|
postInstall = ''
|
|
|
|
sed -E -i 's/enableBackdrops\:function\(\)\{return \_\}/enableBackdrops\:function\(\)\{return P\}/' $out/share/jellyfin-web/main.jellyfin.bundle.js
|
|
|
|
'';
|
|
|
|
};
|
2024-05-13 23:10:27 -04:00
|
|
|
ffmpegPackage = jellyPkgs.jellyfin-ffmpeg;
|
|
|
|
};
|
2024-03-02 23:36:07 -05:00
|
|
|
|
2024-08-31 19:16:06 -04:00
|
|
|
environment.systemPackages = builtins.attrValues {
|
|
|
|
inherit
|
|
|
|
(config.services.jellyfin)
|
|
|
|
finalPackage
|
|
|
|
webPackage
|
|
|
|
ffmpegPackage
|
|
|
|
;
|
|
|
|
};
|
2024-03-01 21:36:57 -05:00
|
|
|
}
|