nixos-configs/devices/nos/modules/jellyfin/packages.nix
matt1432 297e5bd43a
All checks were successful
Discord / discord commits (push) Has been skipped
feat(jellyfin): enable backdrops by default
2024-03-05 12:53:28 -05:00

37 lines
903 B
Nix

{
config,
lib,
pkgs,
...
}: let
inherit (lib) hasAttr optionals;
jellyPkgs =
if config.nvidia.enableCUDA
then pkgs.cudaPackages.pkgs
else pkgs;
in {
services.jellyfin.package = jellyPkgs.jellyfin;
environment.systemPackages = [
jellyPkgs.jellyfin
jellyPkgs.jellyfin-ffmpeg
(jellyPkgs.jellyfin-web.overrideAttrs (_: o: {
patches =
[
(pkgs.fetchpatch {
name = "skipintro.patch";
url = "https://pastebin.com/raw/EEgvReaw";
hash = "sha256-kfvOz0ukDY09kkbmZi24ch5KWJsVcThNEVnjlk4sAC0=";
})
]
++ optionals (hasAttr "patches" o) o.patches;
# Enable backdrops by default
postInstall = ''
sed -E -i 's/enableBackdrops\:function\(\)\{return P\}/enableBackdrops\:function\(\)\{return \_\}/' $out/share/jellyfin-web/main.jellyfin.bundle.js
'';
}))
];
}