lab-infra/machines/photo01/photoprism.nix
Constantin Gierczak--Galle 8e35fe9b2b
Some checks failed
Check meta / check_meta (push) Failing after 18s
lint / check (push) Successful in 23s
Check meta / check_meta (pull_request) Failing after 19s
lint / check (pull_request) Successful in 24s
build configuration / build_krz01 (pull_request) Failing after 1m35s
feat(dns01): bootstrap DNS
2024-12-07 13:10:13 +01:00

54 lines
1.3 KiB
Nix

{ pkgs, ... }:
{
services = {
photoprism = {
enable = true;
port = 2342;
settings = {
PHOTOPRISM_DEFAULT_LOCALE = "fr";
PHOTOPRISM_ADMIN_USERNAME = "admin";
PHOHOPRISM_SITE_URL = "https://photoprism.lab.dgnum.eu";
PHOTOPRISM_SITE_CAPTION = "PhotoPrism";
# DB access config
PHOTOPRISM_DATABASE_DRIVER = "mysql";
PHOTOPRISM_DATABASE_NAME = "photoprism";
PHOTOPRISM_DATABASE_SERVER = "/run/mysqld/mysqld.sock";
PHOTOPRISM_DATABASE_USER = "photoprism";
};
originalsPath = "/data/photos";
address = "localhost";
#importPath = "/photoprism/imports";
passwordFile = "/passwords/photoprism";
};
mysql = {
enable = true;
dataDir = "/data/mysql";
package = pkgs.mariadb;
ensureDatabases = [ "photoprism" ];
ensureUsers = [
{
name = "photoprism";
ensurePermissions = {
"photoprism.*" = "ALL PRIVILEGES";
};
}
];
};
nginx.virtualHosts."photoprism.lab.dgnum.eu" = {
enableACME = true;
forceSSL = true;
serverAliases = [ ];
locations."/" = {
proxyPass = "http://localhost:2342/";
proxyWebsockets = true;
};
};
};
}