aboutsummaryrefslogtreecommitdiff
path: root/modules/containers/jellyfin/default.nix
blob: 96b6deb7e78159c7895569a0ed04ce66cf20de01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ lib, ... }:
let
  directory = "/opt/jellyfin";
in
{
  systemd.tmpfiles.rules =
    map (x: "d ${x} 0755 share share - -") (lib.lists.singleton directory);

  virtualisation.oci-containers.containers.jellyfin = {
    image = "jellyfin/jellyfin:latest";
    autoStart = true;
    user = "994:994";
    ports = [
      "8096:8096/tcp"
    ];
    volumes = [
      "${directory}/config:/config"
      "${directory}/cache:/cache"
      "/lagoon/media:/media"
    ];
  };

  services.caddy.virtualHosts."buttered.brownbread.net".extraConfig = ''
    encode zstd gzip
    reverse_proxy http://localhost:8096
  '';
}