mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 23:11:34 +01:00
34 lines
698 B
Nix
34 lines
698 B
Nix
{ 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 ];
|
|
};
|
|
|
|
services.stirling-pdf = {
|
|
enable = true;
|
|
environment = {
|
|
SERVER_ADDRESS = "127.0.0.1";
|
|
SERVER_PORT = cfg.port;
|
|
SYSTEM_ENABLEANALYTICS = "false";
|
|
LANGS = "de_DE";
|
|
};
|
|
};
|
|
};
|
|
}
|