add zipline

This commit is contained in:
cy 2025-02-13 21:49:52 -05:00
parent 0992f2f308
commit 9877335f4b
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts
5 changed files with 79 additions and 0 deletions

38
modules/zipline.nix Normal file
View file

@ -0,0 +1,38 @@
{
config,
lib,
...
}:
let
cfg = config.my.zipline;
in
{
options.my.zipline = {
enable = lib.mkEnableOption "zipline";
};
config = lib.mkIf cfg.enable {
services.zipline = {
enable = true;
settings = {
CORE_PORT = 3001;
DATASOURCE_TYPE = "s3";
DATASOURCE_S3_ENDPOINT = "e3e97aac307d106a7becea43cef8fcbd.r2.cloudflarestorage.com";
DATASOURCE_S3_BUCKET = "cything";
DATASOURCE_S3_REGION = "us-east-1";
DATASOURCE_S3_USE_SSL = "true";
DATASOURCE_S3_FORCE_S3_PATH = "false";
FEATURES_THUMBNAILS = "true";
EXIF_REMOVE_GPS = "true";
CHUNKS_CHUNKS_SIZE = "50mb";
CHUNKS_MAX_SIZE = "95mb";
};
environmentFiles = [ config.sops.secrets."zipline/env".path ];
};
services.caddy.virtualHosts."host.cy7.sh".extraConfig = ''
import common
reverse_proxy 127.0.0.1:3001
'';
};
}