about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/photo/photoprism.nix
blob: c1cbbf8e29f7ebb0c8d82031e87d438c042b39f2 (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
29
30
31
32
33
{ config, ... }:

{
  services.nginx.virtualHosts."photo.emile.space" = {
    forceSSL = true;
    enableACME = true;

    locations = {
      "/" = {
        proxyPass = "http://127.0.0.1:${toString config.services.photoprism.port}";
        proxyWebsockets = true;
      };
    };
  };

  services.photoprism = {
    enable = true;

    address = "127.0.0.1";
    port = config.emile.ports.photo.photoprism;

    passwordFile = config.age.secrets.photoprism_password.path;

    # originalsPath = "/data/photos";
    originalsPath = "/mnt/storagebox-bx11/photos";

    settings = {
      PHOTOPRISM_ADMIN_USER = "root";
      PHOTOPRISM_DEFAULT_LOCALE = "en";
      PHOTOPRISM_SITE_URL = "https://photo.emile.space";
    };
  };
}