glance: Group services by host

This commit is contained in:
SebastianStork 2026-03-09 22:25:57 +01:00
parent 2d9a779fb1
commit 8c549955c2
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -28,30 +28,31 @@ in
pages = lib.singleton {
name = "Services";
columns = [
{
columns = lib.singleton {
size = "full";
widgets = [
widgets =
allHosts
|> lib.attrValues
|> lib.map (host: {
hostName = host.config.networking.hostName;
domains =
host.config.custom.services.caddy.virtualHosts |> lib.attrValues |> lib.map (vHost: vHost.domain);
})
|> lib.map (
{ hostName, domains }:
{
type = "monitor";
cache = "1m";
title = "Services";
title = "Services - ${hostName}";
sites =
allHosts
|> lib.attrValues
|> lib.map (
host:
host.config.custom.services.caddy.virtualHosts |> lib.attrValues |> lib.map (vHost: vHost.domain)
)
|> lib.concatLists
domains
|> lib.map (domain: {
title = domain;
url = "https://${domain}";
});
}
];
}
];
);
};
};
};
};