mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 15:00:14 +00:00
add uptime-kuma status page
This commit is contained in:
@ -35,6 +35,7 @@
|
||||
./secrets.nix
|
||||
./sshd.nix
|
||||
./transmission.nix
|
||||
./uptime-kuma.nix
|
||||
./vaultwarden.nix
|
||||
./victoriametrics.nix
|
||||
./wireguard.nix
|
||||
|
@ -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";
|
||||
|
39
modules/nixos/services/uptime-kuma.nix
Normal file
39
modules/nixos/services/uptime-kuma.nix
Normal 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 ];
|
||||
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user