diff --git a/hosts/cumulus/default.nix b/hosts/cumulus/default.nix index a3710b8..883e0e8 100644 --- a/hosts/cumulus/default.nix +++ b/hosts/cumulus/default.nix @@ -18,6 +18,7 @@ gatus = { enable = true; domain = "status.${config.custom.services.tailscale.domain}"; + endpointDomains = config.meta.domains.globalList; endpoints = { "status".group = "Monitoring"; "alerts" = { @@ -28,6 +29,7 @@ "git ssh".url = "ssh://git.sstork.dev"; }; }; + ntfy = { enable = true; domain = "alerts.${config.custom.services.tailscale.domain}"; diff --git a/modules/system/services/gatus.nix b/modules/system/services/gatus.nix index ede0bc0..4dd336b 100644 --- a/modules/system/services/gatus.nix +++ b/modules/system/services/gatus.nix @@ -13,6 +13,10 @@ in type = lib.types.port; default = 8080; }; + endpointDomains = lib.mkOption { + type = lib.types.listOf lib.types.nonEmptyStr; + default = [ ]; + }; endpoints = lib.mkOption { type = lib.types.attrsOf ( lib.types.submodule ( @@ -61,7 +65,7 @@ in let getSubdomain = domain: domain |> lib.splitString "." |> lib.head; in - config.meta.domains.globalList + cfg.endpointDomains |> lib.map (domain: lib.nameValuePair (getSubdomain domain) { url = "https://${domain}"; }) |> lib.listToAttrs;