From a906baa322158f7e34bb47fa7808a7ea5b2ceb94 Mon Sep 17 00:00:00 2001 From: 514fpv Date: Mon, 18 Mar 2024 11:09:56 +0800 Subject: [PATCH] feat(web): enable uptime-kuma --- spec/web/nginx.nix | 9 +++++++++ spec/web/uptime.nix | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 spec/web/uptime.nix diff --git a/spec/web/nginx.nix b/spec/web/nginx.nix index c0bf7f1e..ae1506bc 100644 --- a/spec/web/nginx.nix +++ b/spec/web/nginx.nix @@ -25,6 +25,15 @@ globalRedirect = "514fpv.one"; enableACME = true; }; + + "uptime.514fpv.one" = { + locations."/" = { + proxyPass = "http://127.0.0.1:4000"; + proxyWebsockets = true; + }; + forceSSL = true; + enableACME = true; + }; }; }; diff --git a/spec/web/uptime.nix b/spec/web/uptime.nix new file mode 100644 index 00000000..d9b27c68 --- /dev/null +++ b/spec/web/uptime.nix @@ -0,0 +1,11 @@ +{ + services.uptime-kuma = { + enable = true; + settings.HOST = "127.0.0.1"; + settings.PORT = "4000"; + }; + + environment.persistence."/nix/persist/fhs".directories = [ + "/var/lib/private/uptime-kuma" + ]; +}