summaryrefslogtreecommitdiff
path: root/immich.nix
blob: 1bac19b3e6addc1c5fb7f58c6cecd16922b2c206 (plain) (blame)
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
29
30
{ config, ... }:
let
  storageDir = "/media/draupner/immich-media";
in
{
  services.immich = {
    enable = true;
    mediaLocation = storageDir;
    accelerationDevices = [ "/dev/dri/renderD128" ];
    database = {
      enableVectors = false;
      enableVectorChord = true;
    };
    # settings.server.externalDomain = "immich.0m.nu";
  };

  systemd.tmpfiles.rules = [ "d ${storageDir} 750 immich immich" ];

  services.nginx = {
    enable = true;
    virtualHosts."immich.oden.m" = {
      locations."/" = {
        proxyPass = "http://localhost:${toString config.services.immich.port}";
      };
    };
  };
  networking.firewall.allowedTCPPorts = [ 80 ];

  # services.immich-public-proxy = { };
}