diff --git a/hosts/nickel/default.nix b/hosts/nickel/default.nix index eb56545..1684e3c 100644 --- a/hosts/nickel/default.nix +++ b/hosts/nickel/default.nix @@ -376,6 +376,9 @@ locations."/".proxyPass = "http://127.0.0.1:${toString config.services.scrutiny.settings.web.listen.port}"; }; + "status.${labDomain}" = labCert // { + locations."/".proxyPass = "http://127.0.0.1:${toString config.services.gatus.settings.web.port}"; + }; "home.${labDomain}" = labCert // { locations."/" = { proxyPass = "http://127.0.0.1:${toString config.services.home-assistant.config.http.server_port}"; @@ -490,6 +493,48 @@ enable = true; }; + services.gatus = { + enable = true; + settings = { + web.port = 3333; + connectivity.checker = { + target = "1.1.1.1:53"; + interval = "60s"; + }; + endpoints = [ + { + name = "Syncthing cloud node"; + url = "https://sync.joinemm.dev/rest/noauth/health"; + interval = "5m"; + conditions = [ + "[STATUS] == 200" + "[BODY].status == OK" + "[RESPONSE_TIME] < 300" + ]; + } + { + name = "Minecraft"; + url = "https://mcapi.us/server/status?ip=mc.joinemm.dev"; + interval = "10m"; + conditions = [ + "[STATUS] == 200" + "[BODY].online == true" + "[RESPONSE_TIME] < 1000" + ]; + } + { + name = "Radicale"; + url = "https://dav.joinemm.dev"; + interval = "5m"; + conditions = [ + "[STATUS] == 200" + "[RESPONSE_TIME] < 300" + ]; + } + ]; + }; + }; + home-manager.users.${user.name} = { home.stateVersion = config.system.stateVersion; xdg.configFile."recyclarr/recyclarr.yml".source = ./recyclarr.yml;