mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 17:31:34 +01:00
Add gatus.endpointDomains option
This commit is contained in:
parent
6c0ff3393b
commit
9a832b61e1
2 changed files with 7 additions and 1 deletions
|
|
@ -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}";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue