From deb3e455bd2729ea530164ef3844139e12274260 Mon Sep 17 00:00:00 2001 From: niten Date: Sun, 10 Dec 2023 16:10:09 -0800 Subject: [PATCH] Only need DB SSL if on a public network --- lib/fudo/grafana.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fudo/grafana.nix b/lib/fudo/grafana.nix index d05dc72..ae3f1d9 100644 --- a/lib/fudo/grafana.nix +++ b/lib/fudo/grafana.nix @@ -145,7 +145,7 @@ in { }; datasources = mkOption { - type = listOf (submodule datasourceOpts); + type = attrsOf (submodule datasourceOpts); description = "A list of datasources supplied to Grafana."; default = { }; }; @@ -231,7 +231,7 @@ in { user = cfg.database.user; password = "$__file{${cfg.database.password-file}}"; type = "postgres"; - ssl_mode = "require"; + ssl_mode = if cfg.private-nework then "disable" else "require"; }; "ldap.auth" = mkIf (cfg.ldap != null) (let