From 8c2c3baf21d8783cbe0a5ba3352f134bad1b1a85 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 11 Oct 2021 23:04:05 +0200 Subject: [PATCH] grafana: replace caddy with nginx ...so that it's automatically included in public-access-proxy --- hosts/containers/grafana/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hosts/containers/grafana/default.nix b/hosts/containers/grafana/default.nix index af40c816..03f1749c 100644 --- a/hosts/containers/grafana/default.nix +++ b/hosts/containers/grafana/default.nix @@ -20,12 +20,16 @@ # collectd networking.firewall.allowedUDPPorts = [ 25826 ]; - services.caddy = { + services.nginx = { enable = true; - config = '' - grafana.hq.c3d2.de - reverse_proxy localhost:3000 - ''; + virtualHosts = { + "grafana.hq.c3d2.de" = { + default = true; + enableACME = true; + forceSSL = true; + locations = { "/".proxyPass = "http://localhost:3000/"; }; + }; + }; }; services.grafana = { enable = true;