nix-config/containers/jellyfin/default.nix

28 lines
591 B
Nix
Raw Permalink Normal View History

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