feat(vesuvio): add gatus
This commit is contained in:
parent
7d51ce6f18
commit
2e241a93d7
5 changed files with 93 additions and 0 deletions
75
systems/vesuvio/gatus.nix
Normal file
75
systems/vesuvio/gatus.nix
Normal file
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
config,
|
||||
_utils,
|
||||
...
|
||||
}:
|
||||
let
|
||||
env = _utils.setupSingleSecret config "gatusEnv" { };
|
||||
|
||||
mkHttpEndpoint = name: group: url: {
|
||||
inherit name group url;
|
||||
interval = "5m";
|
||||
conditions = [
|
||||
"[STATUS] < 300"
|
||||
"[CONNECTED] == true"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ env.generate ];
|
||||
|
||||
services = {
|
||||
gatus = {
|
||||
enable = true;
|
||||
environmentFile = env.path;
|
||||
|
||||
settings = {
|
||||
web.port = 8080;
|
||||
|
||||
storage = {
|
||||
type = "postgres";
|
||||
path = "postgres://gatus:\${DB_PASSWORD}@etna/gatus?sslmode=disable";
|
||||
};
|
||||
|
||||
ui = {
|
||||
title = "uku's services | status";
|
||||
description = "services status powered by gatus";
|
||||
header = "uku's services";
|
||||
logo = "https://avatars.githubusercontent.com/u/61147779?v=4";
|
||||
link = "https://git.uku3lig.net/uku/flake";
|
||||
};
|
||||
|
||||
endpoints = [
|
||||
(mkHttpEndpoint "Website" "core" "https://uku3lig.net")
|
||||
|
||||
# TODO postgres?
|
||||
(mkHttpEndpoint "API" "etna" "https://api.uku3lig.net/downloads/uku")
|
||||
(mkHttpEndpoint "Dendrite" "etna" "https://m.uku.moe/_matrix/static/")
|
||||
(mkHttpEndpoint "Forgejo" "etna" "https://git.uku3lig.net")
|
||||
(mkHttpEndpoint "Grafana" "etna" "https://grafana.uku3lig.net")
|
||||
(mkHttpEndpoint "Immich" "etna" "https://im.uku.moe")
|
||||
(mkHttpEndpoint "NextCloud" "etna" "https://cloud.uku3lig.net")
|
||||
(mkHttpEndpoint "Reposilite" "etna" "https://maven.uku3lig.net/")
|
||||
(mkHttpEndpoint "Shlink" "etna" "https://uku.moe/rest/v3/health")
|
||||
(mkHttpEndpoint "Vaultwarden" "etna" "https://bw.uku3lig.net")
|
||||
|
||||
{
|
||||
name = "Maddy";
|
||||
group = "vesuvio";
|
||||
url = "starttls://mx1.uku3lig.net:587";
|
||||
interval = "5m";
|
||||
conditions = [ "[CONNECTED] == true" ];
|
||||
}
|
||||
(mkHttpEndpoint "Roundcube" "vesuvio" "https://mail.uku3lig.net")
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nginx.virtualHosts."status.uku3lig.net" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/".proxyPass =
|
||||
"http://localhost:${builtins.toString config.services.gatus.settings.web.port}";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue