nixos-configs/devices/nos/modules/jellyfin/packages.nix
matt1432 3d6873da69
All checks were successful
Discord / discord commits (push) Has been skipped
chore(jellyfin): misc changes for update
2024-10-28 09:08:54 -04:00

31 lines
769 B
Nix

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