2024-04-18 18:23:11 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-04-18 18:19:59 +02:00
|
|
|
let
|
2024-04-18 18:23:11 +02:00
|
|
|
probesFormat = pkgs.formats.json { };
|
2024-04-18 18:19:59 +02:00
|
|
|
cfg = config.statelessUptimeKuma;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.statelessUptimeKuma = {
|
|
|
|
build.json = lib.mkOption {
|
|
|
|
internal = true;
|
|
|
|
visible = false;
|
|
|
|
type = lib.types.package;
|
|
|
|
};
|
|
|
|
probesConfig = {
|
|
|
|
monitors = lib.mkOption {
|
|
|
|
inherit (probesFormat) type;
|
2024-04-18 18:23:11 +02:00
|
|
|
default = [ ];
|
2024-04-18 18:19:59 +02:00
|
|
|
};
|
|
|
|
tags = lib.mkOption {
|
|
|
|
inherit (probesFormat) type;
|
2024-04-18 18:23:11 +02:00
|
|
|
default = [ ];
|
2024-04-18 18:19:59 +02:00
|
|
|
};
|
|
|
|
notifications = lib.mkOption {
|
|
|
|
inherit (probesFormat) type;
|
2024-04-18 18:23:11 +02:00
|
|
|
default = [ ];
|
2024-04-18 18:19:59 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config.statelessUptimeKuma = {
|
|
|
|
build.json = probesFormat.generate "probes.json" cfg.probesConfig;
|
|
|
|
};
|
|
|
|
}
|