add uptime-kuma status page

This commit is contained in:
Noah Masur 2024-09-14 22:13:13 +00:00
parent b729eff679
commit 5306070bc5
No known key found for this signature in database
5 changed files with 43 additions and 1 deletions

View File

@ -245,6 +245,7 @@
content = "cloud.${baseName}";
books = "books.${baseName}";
download = "download.${baseName}";
status = "status.${baseName}";
transmission = "transmission.${baseName}";
};
};

View File

@ -82,6 +82,7 @@ inputs.nixpkgs.lib.nixosSystem rec {
services.minecraft-server.enable = true; # Setup Minecraft server
services.n8n.enable = true;
services.ntfy-sh.enable = true;
services.uptime-kuma.enable = true;
system.autoUpgrade.enable = true;
# Allows private remote access over the internet

View File

@ -35,6 +35,7 @@
./secrets.nix
./sshd.nix
./transmission.nix
./uptime-kuma.nix
./vaultwarden.nix
./victoriametrics.nix
./wireguard.nix

View File

@ -4,7 +4,7 @@
config = lib.mkIf config.services.ntfy-sh.enable {
services.ntfy-sh = {
settings = rec {
settings = {
base-url = "https://${config.hostnames.notifications}";
upstream-base-url = "https://ntfy.sh";
listen-http = ":8333";

View File

@ -0,0 +1,39 @@
{ config, lib, ... }:
{
options = {
hostnames.status = lib.mkOption {
type = lib.types.str;
description = "Hostname for status page (Uptime-Kuma).";
};
};
config = lib.mkIf config.services.uptime-kuma.enable {
services.uptime-kuma = {
settings = {
PORT = "3033";
};
};
# Allow web traffic to Caddy
caddy.routes = [
{
match = [ { host = [ config.hostnames.status ]; } ];
handle = [
{
handler = "reverse_proxy";
upstreams = [
{ dial = "localhost:${config.services.uptime-kuma.settings.PORT}"; }
];
}
];
}
];
# Configure Cloudflare DNS to point to this machine
services.cloudflare-dyndns.domains = [ config.hostnames.status ];
};
}