all repos — nixfiles @ a63c2972d3f1fed8dcf426a4c991529df1d62df7

System and user configuration, managed by nix and home-manager

uptime-monitor: add more domains

Alin
commit

a63c2972d3f1fed8dcf426a4c991529df1d62df7

parent

f9de158b83db7760b61cc7bd682a6ca410a35e46

1 file changed, 16 insertions(+), 6 deletions(-)

changed files
M system/roles/uptime-monitor.nix → system/roles/uptime-monitor.nix
@@ -8,7 +8,7 @@ inherit (import ../../data) homenet pubnet;
inherit (config.networking) domain fqdn; cfg = config.services.uptime-kuma.settings; - extraConfig = '' + reverse_proxy = '' reverse_proxy localhost:${cfg.PORT} ''; in
@@ -22,22 +22,32 @@ };
}; services.caddy.virtualHosts = { - "status.${pubnet}" = { - inherit extraConfig; + "uptime.${pubnet}" = { + serverAliases = [ + "status.${pubnet}" + "status.searchix.ovh" + ]; + extraConfig = '' + ${reverse_proxy} + ''; }; - "status.${homenet}" = lib.mkIf (domain == homenet) { + "uptime.${homenet}" = lib.mkIf (domain == homenet) { + serverAliases = [ + "status.${homenet}" + ]; extraConfig = '' tls { issuer internal { ca home } } - '' - + extraConfig; + ${reverse_proxy} + ''; }; }; services.dnsmasq.settings.cname = [ + "uptime.${domain},${fqdn}" "status.${domain},${fqdn}" ]; }