uptime-kuma: Init module

This commit is contained in:
SebastianStork 2025-10-26 23:22:53 +01:00
parent 4f1143c9ec
commit b94d47b5ab
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -0,0 +1,31 @@
{ config, lib, ... }:
let
cfg = config.custom.services.uptime-kuma;
in
{
options.custom.services.uptime-kuma = {
enable = lib.mkEnableOption "";
domain = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "";
};
port = lib.mkOption {
type = lib.types.port;
default = 44019;
};
};
config = lib.mkIf cfg.enable {
meta = {
domains.list = [ cfg.domain ];
ports.tcp.list = [ cfg.port ];
};
services.uptime-kuma = {
enable = true;
settings.PORT = toString cfg.port;
};
custom.persist.directories = [ config.services.uptime-kuma.settings.DATA_DIR ];
};
}