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

33 lines
677 B
Nix
Raw Normal View History

{
config,
lib,
pkgs,
...
}: let
inherit (lib) hasAttr optionals;
jellyPkgs =
2024-03-03 17:34:21 -05:00
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;
}))
];
}