Add custom libs subdomainOf and rootDomainOf

This commit is contained in:
SebastianStork 2025-10-12 23:15:32 +02:00
parent f3ea2b75e6
commit 8807d38b57
3 changed files with 9 additions and 10 deletions

View file

@ -101,8 +101,6 @@ in
custom.services.gatus.endpoints =
let
getSubdomain = domain: domain |> lib.splitString "." |> lib.head;
defaultEndpoints =
self.nixosConfigurations
|> lib.mapAttrs (_: value: value.config.meta.domains.list)
@ -112,7 +110,7 @@ in
|> lib.filter (domain: domain != cfg.domain)
|> lib.map (
domain:
lib.nameValuePair (getSubdomain domain) {
lib.nameValuePair (lib.custom.subdomainOf domain) {
inherit domain;
group = hostName;
}