This commit is contained in:
Anaïs Saraiva
2026-08-15 00:54:04 +02:00
parent ad469460a4
commit f735c64e62
9 changed files with 97 additions and 29 deletions
+8 -1
View File
@@ -42,10 +42,16 @@ in
maxFileSize = lib.mkOption {
type = lib.types.str;
default = "5GB";
default = "10GB";
description = "Maximum upload size (B/KB/MB/GB/TB).";
};
fileTtlMs = lib.mkOption {
type = lib.types.ints.positive;
default = 7 * 24 * 60 * 60 * 1000;
description = "Milliseconds before an uploaded file expires and is deleted.";
};
trustProxy = lib.mkEnableOption "trust of X-Forwarded-* headers (behind a reverse proxy)";
};
@@ -73,6 +79,7 @@ in
"HOST=${cfg.host}"
"STORAGE_DIR=${cfg.storageDir}"
"MAX_FILE_SIZE=${cfg.maxFileSize}"
"FILE_TTL_MS=${toString cfg.fileTtlMs}"
] ++ lib.optionals cfg.trustProxy [ "TRUST_PROXY=1" ];
# no runtime deps, so no `bun install` needed at startup