2024-11-26 21:43:36 -05:00
|
|
|
{ lib, ... }:
|
2024-11-10 17:54:08 -05:00
|
|
|
let
|
2024-11-26 21:43:36 -05:00
|
|
|
directory = "/opt/jellyfin";
|
2024-11-10 17:54:08 -05:00
|
|
|
in
|
|
|
|
{
|
2024-11-26 21:43:36 -05:00
|
|
|
systemd.tmpfiles.rules =
|
|
|
|
map (x: "d ${x} 0755 share share - -") (lib.lists.singleton directory);
|
|
|
|
|
2024-11-10 17:54:08 -05:00
|
|
|
virtualisation.oci-containers.containers.jellyfin = {
|
|
|
|
image = "jellyfin/jellyfin:latest";
|
|
|
|
autoStart = true;
|
|
|
|
user = "994:994";
|
|
|
|
ports = [
|
|
|
|
"8096:8096/tcp"
|
|
|
|
];
|
|
|
|
volumes = [
|
2024-11-26 21:43:36 -05:00
|
|
|
"${directory}/config:/config"
|
|
|
|
"${directory}/cache:/cache"
|
2024-11-10 17:54:08 -05:00
|
|
|
"/lagoon/media:/media"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-11-26 21:43:36 -05:00
|
|
|
services.caddy.virtualHosts."buttered.brownbread.net".extraConfig = ''
|
2024-11-10 17:54:08 -05:00
|
|
|
encode zstd gzip
|
|
|
|
reverse_proxy http://localhost:8096
|
|
|
|
'';
|
|
|
|
}
|