diff --git a/configuration.nix b/configuration.nix index 843fd47..f662b8d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -8,6 +8,7 @@ # Services ./services/ssh.nix ./services/nginx.nix + ./services/uptime-kuma.nix ./services/nextcloud.nix ./services/tt-rss.nix ./services/owncast.nix diff --git a/services/uptime-kuma.nix b/services/uptime-kuma.nix new file mode 100644 index 0000000..d59513b --- /dev/null +++ b/services/uptime-kuma.nix @@ -0,0 +1,25 @@ +{ config, ... }: + +{ + services.uptime-kuma = { + enable = true; + settings = { + PORT = "4000"; + }; + }; + + services.nginx.virtualHosts."status.hermitcollective.net" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://localhost:4000"; + proxyWebsockets = true; # needed if you need to use WebSocket + extraConfig = + # required when the target is also TLS server with multiple hosts + "proxy_ssl_server_name on;" + + # required when the server wants to use HTTP Authentication + "proxy_pass_header Authorization;" + ; + }; + }; +}