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

32 lines
769 B
Nix
Raw Normal View History

{
config,
jellyfin-flake,
pkgs,
...
}: let
jellyPkgs =
2024-03-03 17:34:21 -05:00
if config.nvidia.enableCUDA
then jellyfin-flake.packages.${pkgs.system}.cudaPackages
else jellyfin-flake.packages.${pkgs.system};
in {
services.jellyfin = {
package = jellyPkgs.jellyfin;
2024-05-26 15:48:19 -04:00
webPackage = jellyPkgs.jellyfin-web.overrideAttrs {
postInstall = ''
substituteInPlace $out/share/jellyfin-web/main.jellyfin.bundle.js --replace-fail \
'enableBackdrops:function(){return L}' 'enableBackdrops:function(){return _}'
2024-05-26 15:48:19 -04:00
'';
};
ffmpegPackage = jellyPkgs.jellyfin-ffmpeg;
};
environment.systemPackages = builtins.attrValues {
inherit
(config.services.jellyfin)
finalPackage
webPackage
ffmpegPackage
;
};
}