mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 22:11:33 +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 = {
|
gatus = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "status.${config.custom.services.tailscale.domain}";
|
domain = "status.${config.custom.services.tailscale.domain}";
|
||||||
|
endpointDomains = config.meta.domains.globalList;
|
||||||
endpoints = {
|
endpoints = {
|
||||||
"status".group = "Monitoring";
|
"status".group = "Monitoring";
|
||||||
"alerts" = {
|
"alerts" = {
|
||||||
|
|
@ -28,6 +29,7 @@
|
||||||
"git ssh".url = "ssh://git.sstork.dev";
|
"git ssh".url = "ssh://git.sstork.dev";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ntfy = {
|
ntfy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "alerts.${config.custom.services.tailscale.domain}";
|
domain = "alerts.${config.custom.services.tailscale.domain}";
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,10 @@ in
|
||||||
type = lib.types.port;
|
type = lib.types.port;
|
||||||
default = 8080;
|
default = 8080;
|
||||||
};
|
};
|
||||||
|
endpointDomains = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.nonEmptyStr;
|
||||||
|
default = [ ];
|
||||||
|
};
|
||||||
endpoints = lib.mkOption {
|
endpoints = lib.mkOption {
|
||||||
type = lib.types.attrsOf (
|
type = lib.types.attrsOf (
|
||||||
lib.types.submodule (
|
lib.types.submodule (
|
||||||
|
|
@ -61,7 +65,7 @@ in
|
||||||
let
|
let
|
||||||
getSubdomain = domain: domain |> lib.splitString "." |> lib.head;
|
getSubdomain = domain: domain |> lib.splitString "." |> lib.head;
|
||||||
in
|
in
|
||||||
config.meta.domains.globalList
|
cfg.endpointDomains
|
||||||
|> lib.map (domain: lib.nameValuePair (getSubdomain domain) { url = "https://${domain}"; })
|
|> lib.map (domain: lib.nameValuePair (getSubdomain domain) { url = "https://${domain}"; })
|
||||||
|> lib.listToAttrs;
|
|> lib.listToAttrs;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue