stateless-uptime-kuma/nixos/module.nix
2024-04-18 18:19:59 +02:00

31 lines
708 B
Nix

{ config, lib, pkgs, ... }:
let
probesFormat = pkgs.formats.json {};
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;
default = [];
};
tags = lib.mkOption {
inherit (probesFormat) type;
default = [];
};
notifications = lib.mkOption {
inherit (probesFormat) type;
default = [];
};
};
};
config.statelessUptimeKuma = {
build.json = probesFormat.generate "probes.json" cfg.probesConfig;
};
}