aboutsummaryrefslogtreecommitdiff
path: root/modules/retired/kavita/default.nix
blob: 893eaefd8f8dcffd865c01be6b08fcff8536571a (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
28
{ ... }:
let
  directories = [
    "/opt/kavita"
  ];
in
{
  systemd.tmpfiles.rules = map (x: "d ${x} 0755 share share - -") directories;
  virtualisation.oci-containers.containers.kavita = {
    image = "jvmilazz0/kavita:latest";
    autoStart = true;
    ports = [
      "5000:5000"
    ];
    volumes = [
      "/opt/kavita/config:/kavita/config"
      "/tank/media/library/Books:/books"
    ];
    environment = {
      TZ = "America/Detroit";
    };
  };

  services.caddy.virtualHosts."library.tdback.net".extraConfig = ''
    encode zstd gzip
    reverse_proxy http://localhost:5000
  '';
}