mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 22:29:06 +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 {
|
pages = lib.singleton {
|
||||||
name = "Services";
|
name = "Services";
|
||||||
columns = [
|
columns = lib.singleton {
|
||||||
{
|
size = "full";
|
||||||
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";
|
type = "monitor";
|
||||||
cache = "1m";
|
cache = "1m";
|
||||||
title = "Services";
|
title = "Services - ${hostName}";
|
||||||
sites =
|
sites =
|
||||||
allHosts
|
domains
|
||||||
|> lib.attrValues
|
|
||||||
|> lib.map (
|
|
||||||
host:
|
|
||||||
host.config.custom.services.caddy.virtualHosts |> lib.attrValues |> lib.map (vHost: vHost.domain)
|
|
||||||
)
|
|
||||||
|> lib.concatLists
|
|
||||||
|> lib.map (domain: {
|
|> lib.map (domain: {
|
||||||
title = domain;
|
title = domain;
|
||||||
url = "https://${domain}";
|
url = "https://${domain}";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
];
|
);
|
||||||
}
|
};
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue