{ sops.secrets = { "software/photoprism" = { path = "/run/secrets/photoprism/config.yaml"; mode = "0600"; }; }; virtualisation.arion = { backend = "podman-socket"; projects.photoprism = { settings = { services.photoprism.service = { ports = [ "8096:8096" ]; container_name = "photoprism"; image = "photoprism/photoprism:latest"; restart = "always"; depends_on = ["mariadb"]; volumes = [ "/media/photos/sam/originals:/photoprism/originals" "/media/photos/sam/imports:/photoprism/import" "/srv/docker/photoprism/storage:/photoprism/storage" "/run/secrets/photoprism/config.yaml:/etc/photoprism/config.yaml" ]; environment = { PHOTOPRISM_CONFIG_PATH = "/etc/photoprism/config.yaml"; PHOTOPRISM_INIT = "intel"; PHOTOPRISM_ORIGINALS_LIMIT = 5000; PHOTOPRISM_HTTP_COMPRESSION = "gzip"; PHOTOPRISM_DEBUG = "false"; PHOTOPRISM_LOG = "trace"; PHOTOPRISM_PUBLIC = "false"; PHOTOPRISM_READONLY = "false"; PHOTOPRISM_EXPERIMENTAL = "false"; PHOTOPRISM_DISABLE_CHOWN = "false"; PHOTOPRISM_DISABLE_WEBDAV = "false"; PHOTOPRISM_DISABLE_SETTINGS = "false"; PHOTOPRISM_DISABLE_TENSORFLOW = "false"; PHOTOPRISM_DISABLE_FACES = "false"; PHOTOPRISM_DISABLE_CLASSIFICATION = "false"; PHOTOPRISM_DARKTABLE_PRESETS = "false"; PHOTOPRISM_DETECT_NSFW = "false"; PHOTOPRISM_UPLOAD_NSFW = "true"; PHOTOPRISM_DATABASE_DRIVER = "mysql"; PHOTOPRISM_DATABASE_SERVER = "mariadb:3306"; PHOTOPRISM_DATABASE_NAME = "photoprism"; PHOTOPRISM_DATABASE_USER = "photoprism"; PHOTOPRISM_SITE_TITLE = "PhotoPrism"; PHOTOPRISM_SITE_CAPTION = "AI-Powered Photos App"; PHOTOPRISM_UID = 0; PHOTOPRISM_GID = 0; PHOTOPRISM_FFMPEG_ENCODER = "intel"; PHOTOPRISM_FFMPEG_SIZE = "1920"; PHOTOPRISM_FFMPEG_BITRATE = "50"; HOME = "/photoprism"; }; devices = ["/dev/dri:/dev/dri"]; }; services.mariadb.service = { container_name = "photoprism-mariadb"; image = "mariadb:10.11"; restart = "always"; command = "mysqld --innodb-buffer-pool-size=4G --innodb_log_file_size=1G --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120"; volumes = [ "/srv/docker/photoprism/database:/var/lib/mysql" ]; environment = { MARIADB_AUTO_UPGRADE = "1"; MARIADB_INITDB_SKIP_TZINFO = "1"; MYSQL_DATABASE = "photoprism"; MYSQL_USER = "photoprism"; }; }; }; }; }; }