This commit is contained in:
@@ -17,5 +17,6 @@
|
||||
./actualbudget.nix
|
||||
./unifi.nix
|
||||
./ntfy.nix
|
||||
./uptime-kuma.nix
|
||||
];
|
||||
}
|
||||
|
||||
36
common/server/uptime-kuma.nix
Normal file
36
common/server/uptime-kuma.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -112,4 +112,8 @@
|
||||
# push notifications
|
||||
services.ntfy-sh.enable = true;
|
||||
services.ntfy-sh.hostname = "ntfy.neet.dev";
|
||||
|
||||
# uptime monitoring
|
||||
services.uptime-kuma.enable = true;
|
||||
services.uptime-kuma.hostname = "status.neet.dev";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user