glance: Add services

This commit is contained in:
SebastianStork 2026-03-09 21:53:25 +01:00
parent 3abf299cd6
commit 81cb5c2723
Signed by: SebastianStork
SSH key fingerprint: SHA256:tRrGdjYOwgHxpSc/wTOZQZEjxcb15P0tyXRsbAfd+2Q

View file

@ -1,4 +1,9 @@
{ config, lib, ... }:
{
config,
lib,
allHosts,
...
}:
let
cfg = config.custom.web-services.glance;
in
@ -21,7 +26,32 @@ in
settings = {
inherit (cfg) port;
#pages
pages = lib.singleton {
name = "Services";
columns = [
{
size = "full";
widgets = [
{
type = "monitor";
cache = "1m";
title = "Services";
sites =
allHosts
|> lib.attrValues (
host:
host.config.custom.services.caddy.virtualHosts |> lib.attrValues |> lib.map (vHost: vHost.domain)
)
|> lib.concatLists
|> lib.map (domain: {
title = domain;
url = domain;
});
}
];
}
];
};
};
};