From 5b3c59bf26ff8b9c38f3ca78451b42ad0014a585 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 7 Nov 2022 22:43:26 +0100 Subject: ... --- hosts/vidhar/default.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'hosts/vidhar/default.nix') diff --git a/hosts/vidhar/default.nix b/hosts/vidhar/default.nix index e40342df..a5c60419 100644 --- a/hosts/vidhar/default.nix +++ b/hosts/vidhar/default.nix @@ -129,10 +129,10 @@ with lib; client_body_temp_path /run/nginx-client-bodies; ''; upstreams.grafana = { - servers = { "unix:${config.services.grafana.socket}" = {}; }; + servers = { "unix:${config.services.grafana.settings.server.socket}" = {}; }; }; virtualHosts = { - ${config.services.grafana.domain} = { + ${config.services.grafana.settings.server.domain} = { forceSSL = true; sslCertificate = ./selfsigned.crt; sslCertificateKey = "/run/credentials/nginx.service/selfsigned.key"; @@ -146,11 +146,13 @@ with lib; users.users.nginx.extraGroups = ["grafana"]; services.grafana = { enable = true; - analytics.reporting.enable = false; - domain = "grafana.vidhar.yggdrasil"; - security.adminPasswordFile = config.sops.secrets."grafana-admin-password".path; - security.secretKeyFile = config.sops.secrets."grafana-secret-key".path; - protocol = "socket"; + settings = { + analytics.reporting_enabled = false; + server.protocol = "socket"; + server.domain = "grafana.vidhar.yggdrasil"; + security.admin_password = "$__file{${config.sops.secrets."grafana-admin-password".path}}"; + security.secret_key = "$__file{${config.sops.secrets."grafana-secret-key".path}}"; + }; }; sops.secrets."grafana-admin-password" = { format = "binary"; -- cgit v1.2.3