Add uptime kuma
All checks were successful
Check Flake / check-flake (push) Successful in 9m15s

This commit is contained in:
2026-02-22 15:49:26 -08:00
parent bab4b3ff8e
commit 339eac52c6
3 changed files with 41 additions and 0 deletions

View File

@@ -17,5 +17,6 @@
./actualbudget.nix
./unifi.nix
./ntfy.nix
./uptime-kuma.nix
];
}

View File

@@ -0,0 +1,36 @@
{ lib, config, ... }:
let
cfg = config.services.uptime-kuma;
port = 3001;
in
{
options.services.uptime-kuma = {
hostname = lib.mkOption {
type = lib.types.str;
example = "status.example.com";
};
};
config = lib.mkIf cfg.enable {
services.uptime-kuma.settings = {
HOST = "127.0.0.1";
PORT = toString port;
};
# backups
backup.group."uptime-kuma".paths = [
"/var/lib/uptime-kuma"
];
services.nginx.enable = true;
services.nginx.virtualHosts.${cfg.hostname} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString port}";
proxyWebsockets = true;
};
};
};
}