stirling-pdf: Init module

This commit is contained in:
SebastianStork 2025-08-31 16:49:34 +02:00
parent de266a8d91
commit 734602820b
2 changed files with 43 additions and 1 deletions

View file

@ -50,6 +50,11 @@
domain = "tools.sprouted.cloud";
};
stirling-pdf = {
enable = true;
domain = "pdf.sprouted.cloud";
};
openspeedtest = {
enable = true;
domain = "speedtest.sprouted.cloud";
@ -65,10 +70,12 @@
it-tools = {
inherit (config.custom.services.it-tools) domain port;
};
stirling-pdf = {
inherit (config.custom.services.stirling-pdf) domain port;
};
openspeedtest = {
inherit (config.custom.services.openspeedtest) domain port;
tls = false;
extraReverseProxyConfig = ''
request_buffers 35MiB
response_buffers 35MiB

View file

@ -0,0 +1,35 @@
{ config, lib, ... }:
let
cfg = config.custom.services.stirling-pdf;
in
{
options.custom.services.stirling-pdf = {
enable = lib.mkEnableOption "";
domain = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "";
};
port = lib.mkOption {
type = lib.types.port;
default = 56191;
};
};
config = lib.mkIf cfg.enable {
meta = {
domains.list = [ cfg.domain ];
ports.tcp.list = [ cfg.port ];
};
virtualisation.oci-containers.containers.stirling-pdf = {
image = "stirlingtools/stirling-pdf";
environment = {
DISABLE_ADDITIONAL_FEATURES = "false";
SYSTEM_ENABLEANALYTICS = "false";
LANGS = "de_DE";
};
ports = [ "127.0.0.1:${builtins.toString cfg.port}:8080" ];
pull = "newer";
};
};
}