{
  config,
  lib,
  namespace,
  ...
}:
with lib;
let
  name = "uptime-kuma";
  cfg = config.${namespace}.services.${name};

  uptime-kumaConfig = lib.${namespace}.mkModule {
    inherit config name;
    description = "uptime kuma";
    options = { };
    moduleConfig = {
      services.uptime-kuma = {
        enable = true;
        appriseSupport = true;
        settings = {
          HOST = "0.0.0.0";
          PORT = "${toString cfg.port}";
        };
      };
    };
  };
in
{
  imports = [ uptime-kumaConfig ];
}
