mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 21:19:07 +01:00
glance: Group services by host
This commit is contained in:
parent
2d9a779fb1
commit
8c549955c2
1 changed files with 16 additions and 15 deletions
|
|
@ -28,30 +28,31 @@ in
|
|||
|
||||
pages = lib.singleton {
|
||||
name = "Services";
|
||||
columns = [
|
||||
{
|
||||
size = "full";
|
||||
widgets = [
|
||||
columns = lib.singleton {
|
||||
size = "full";
|
||||
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}";
|
||||
});
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue