Files
nix-config/common/server/uptime-kuma.nix
Zuckerberg 339eac52c6
All checks were successful
Check Flake / check-flake (push) Successful in 9m15s
Add uptime kuma
2026-02-22 15:49:26 -08:00

37 lines
723 B
Nix

{ 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;
};
};
};
}