From fdd4f4b44333d3edf7412443bb1a7f8ed5d20354 Mon Sep 17 00:00:00 2001 From: sinavir Date: Thu, 28 Mar 2024 16:25:29 +0100 Subject: [PATCH] feat(rescue01): deploy uptime-kuma --- machines/rescue01/_configuration.nix | 1 + machines/rescue01/uptime-kuma.nix | 26 ++++++++++++++++++++++++++ meta/dns.nix | 2 ++ 3 files changed, 29 insertions(+) create mode 100644 machines/rescue01/uptime-kuma.nix diff --git a/machines/rescue01/_configuration.nix b/machines/rescue01/_configuration.nix index f11afbf..6c50ba3 100644 --- a/machines/rescue01/_configuration.nix +++ b/machines/rescue01/_configuration.nix @@ -8,6 +8,7 @@ lib.extra.mkConfig { enabledServices = [ # List of services to enable + "uptime-kuma" ]; extraConfig = { diff --git a/machines/rescue01/uptime-kuma.nix b/machines/rescue01/uptime-kuma.nix new file mode 100644 index 0000000..a90c7ff --- /dev/null +++ b/machines/rescue01/uptime-kuma.nix @@ -0,0 +1,26 @@ +let + host = "status.dgnum.eu"; + + port = 3001; +in +{ + services.uptime-kuma.enable = true; + + services.nginx = { + enable = true; + + virtualHosts.${host} = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${builtins.toString port}"; + proxyWebsockets = true; + }; + }; + }; + + networking.firewall.allowedTCPPorts = [ + 80 + 443 + ]; +} diff --git a/meta/dns.nix b/meta/dns.nix index 731cc8f..e68ac7f 100644 --- a/meta/dns.nix +++ b/meta/dns.nix @@ -44,6 +44,8 @@ let "telegraf" # Telegraf ]; + rescue01 = [ "status" ]; + storage01 = [ "cachix" # Attic "git" # Forgejo