From c565a9873a9ca28add268fffc774dda469e54841 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Fri, 10 Feb 2023 16:22:00 +0100 Subject: [PATCH] update grafana --- nixos/machines/pepe/grafana.nix | 8 +++++--- nixos/machines/robi/grafana.nix | 12 +++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/nixos/machines/pepe/grafana.nix b/nixos/machines/pepe/grafana.nix index 6c5d7ac..7c49b30 100644 --- a/nixos/machines/pepe/grafana.nix +++ b/nixos/machines/pepe/grafana.nix @@ -14,9 +14,11 @@ services.grafana = { enable = true; - domain = "grafana.pepe.private"; - port = 2342; - addr = "localhost"; + settings.server = { + domain = "grafana.pepe.private"; + http_port = 2342; + http_addr = "localhost"; + }; }; } diff --git a/nixos/machines/robi/grafana.nix b/nixos/machines/robi/grafana.nix index b84761a..d8f5642 100644 --- a/nixos/machines/robi/grafana.nix +++ b/nixos/machines/robi/grafana.nix @@ -1,22 +1,24 @@ { config, ... }: { - services.nginx.virtualHosts.${config.services.grafana.domain} = { + services.nginx.virtualHosts.${config.services.grafana.settings.server.domain} = { extraConfig = '' allow ${config.tinc.private.subnet}; deny all; ''; locations."/" = { - proxyPass = "http://localhost:${toString config.services.grafana.port}"; + proxyPass = "http://localhost:${toString config.services.grafana.settings.server.http_port}"; proxyWebsockets = true; }; }; services.grafana = { enable = true; - domain = "grafana.robi.private"; - port = 2342; - addr = "localhost"; + settings.server = { + domain = "grafana.robi.private"; + http_port = 2342; + http_addr = "localhost"; + }; }; }