35 lines
972 B
Nix
35 lines
972 B
Nix
{ config, ... }:
|
|
{
|
|
imports = [
|
|
./nginx
|
|
];
|
|
|
|
services = {
|
|
photoprism = {
|
|
enable = true;
|
|
port = 2342;
|
|
originalsPath = "/var/lib/private/photoprism/originals";
|
|
address = "0.0.0.0";
|
|
settings = {
|
|
PHOTOPRISM_ADMIN_USER = "jimbo";
|
|
PHOTOPRISM_ADMIN_PASSWORD = "${config.secrets.prismAdminPass}";
|
|
PHOTOPRISM_DEFAULT_LOCALE = "en";
|
|
PHOTOPRISM_DATABASE_DRIVER = "mysql";
|
|
PHOTOPRISM_DATABASE_NAME = "photoprism";
|
|
PHOTOPRISM_DATABASE_SERVER = "/run/mysqld/mysqld.sock";
|
|
PHOTOPRISM_DATABASE_USER = "photoprism";
|
|
PHOTOPRISM_SITE_URL = "https://gallery.${config.domains.jim1}";
|
|
PHOTOPRISM_SITE_TITLE = "Jimbo's PhotoPrism";
|
|
};
|
|
};
|
|
nginx.virtualHosts."gallery.${config.domains.jim1}" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:2342";
|
|
proxyWebsockets = true;
|
|
};
|
|
};
|
|
};
|
|
}
|