feat: add declarative status page

This commit is contained in:
Luj 2025-01-18 00:25:18 +01:00
parent f3ba2a1c8b
commit 718128596f
Signed by: luj
GPG key ID: 6FC74C847011FD83
10 changed files with 101 additions and 40 deletions

View file

@ -123,4 +123,24 @@
VfXtULncAiEA2gmqdr+ugFz5tvPdKwanroTiMTUMhhCRYVlQlyTApyQ=
-----END CERTIFICATE-----''
];
machine.meta.probes = {
status_pages."public" = {
title = "Public Services";
description = "State of my public infrastructure";
showTags = false;
publicGroupList =
lib.optionals ((builtins.length (lib.attrNames config.machine.meta.probes.monitors)) > 0)
[
{
name = config.networking.hostName;
weight = 1;
monitorList = builtins.filter (e: (lib.hasInfix ".luj.fr" e) || !(lib.hasInfix ".luj" e)) (
lib.attrNames config.machine.meta.probes.monitors
);
}
];
};
};
}