mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-06-08 10:09:04 +02:00
feat: add declarative status page
This commit is contained in:
parent
f3ba2a1c8b
commit
718128596f
10 changed files with 101 additions and 40 deletions
|
@ -8,15 +8,20 @@
|
|||
}:
|
||||
let
|
||||
|
||||
probesFromConfig = lib.mkMerge (
|
||||
lib.mapAttrsToList (_: value: value.config.machine.meta.monitors) nixosConfigurations
|
||||
monitorsFromConfig = lib.mkMerge (
|
||||
lib.mapAttrsToList (_: value: value.config.machine.meta.probes.monitors) nixosConfigurations
|
||||
);
|
||||
|
||||
pagesFromConfig = lib.mkMerge (
|
||||
lib.mapAttrsToList (_: value: value.config.machine.meta.probes.status_pages) nixosConfigurations
|
||||
);
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
services.uptime-kuma = {
|
||||
enable = true;
|
||||
package = pkgs.uptime-kuma-beta;
|
||||
package = pkgs.unstable.uptime-kuma;
|
||||
settings = {
|
||||
NODE_EXTRA_CA_CERTS = "/etc/ssl/certs/ca-certificates.crt";
|
||||
};
|
||||
|
@ -31,14 +36,16 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
age.secrets."stateless-uptime-kuma-password".file = ../../secrets/stateless-uptime-kuma-password.age;
|
||||
age.secrets."stateless-uptime-kuma-password".file =
|
||||
../../secrets/stateless-uptime-kuma-password.age;
|
||||
nixpkgs.overlays = [
|
||||
(import "${inputs.stateless-uptime-kuma}/overlay.nix")
|
||||
];
|
||||
|
||||
statelessUptimeKuma = {
|
||||
enableService = true;
|
||||
probesConfig.monitors = probesFromConfig;
|
||||
probesConfig.monitors = monitorsFromConfig;
|
||||
probesConfig.status_pages = pagesFromConfig;
|
||||
extraFlags = [
|
||||
"-s"
|
||||
"-v DEBUG"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue