2024-04-21 23:36:25 +02:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.services.uptime-kuma;
|
|
|
|
domain = "status.pvv.ntnu.no";
|
2024-11-09 15:21:12 +01:00
|
|
|
stateDir = "/data/monitoring/uptime-kuma";
|
2024-04-21 23:36:25 +02:00
|
|
|
in {
|
|
|
|
services.uptime-kuma = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
PORT = "5059";
|
|
|
|
HOST = "127.0.1.2";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx.virtualHosts.${domain} = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
kTLS = true;
|
|
|
|
locations."/".proxyPass = "http://${cfg.settings.HOST}:${cfg.settings.PORT}";
|
|
|
|
};
|
2024-11-09 15:21:12 +01:00
|
|
|
|
|
|
|
fileSystems."/var/lib/uptime-kuma" = {
|
|
|
|
device = stateDir;
|
|
|
|
options = [ "bind" ];
|
|
|
|
};
|
2024-04-21 23:36:25 +02:00
|
|
|
}
|