2024-03-01 21:36:57 -05:00
|
|
|
{
|
2024-03-02 23:36:07 -05:00
|
|
|
config,
|
2024-03-01 21:36:57 -05:00
|
|
|
lib,
|
2024-03-02 23:36:07 -05:00
|
|
|
pkgs,
|
2024-03-01 21:36:57 -05:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib) hasAttr optionals;
|
2024-03-02 23:36:07 -05:00
|
|
|
|
|
|
|
jellyPkgs =
|
2024-03-03 17:34:21 -05:00
|
|
|
if config.nvidia.enableCUDA
|
2024-03-02 23:36:07 -05:00
|
|
|
then pkgs.cudaPackages.pkgs
|
|
|
|
else pkgs;
|
2024-03-01 21:36:57 -05:00
|
|
|
in {
|
2024-03-02 23:36:07 -05:00
|
|
|
services.jellyfin.package = jellyPkgs.jellyfin;
|
|
|
|
|
2024-03-01 21:36:57 -05:00
|
|
|
environment.systemPackages = [
|
2024-03-02 23:36:07 -05:00
|
|
|
jellyPkgs.jellyfin
|
|
|
|
jellyPkgs.jellyfin-ffmpeg
|
2024-03-01 21:36:57 -05:00
|
|
|
|
2024-03-02 23:36:07 -05:00
|
|
|
(jellyPkgs.jellyfin-web.overrideAttrs (_: o: {
|
2024-03-01 21:36:57 -05:00
|
|
|
patches =
|
|
|
|
[
|
|
|
|
(pkgs.fetchpatch {
|
|
|
|
name = "skipintro.patch";
|
|
|
|
url = "https://pastebin.com/raw/EEgvReaw";
|
|
|
|
hash = "sha256-kfvOz0ukDY09kkbmZi24ch5KWJsVcThNEVnjlk4sAC0=";
|
|
|
|
})
|
|
|
|
]
|
|
|
|
++ optionals (hasAttr "patches" o) o.patches;
|
|
|
|
}))
|
|
|
|
];
|
|
|
|
}
|