about summary refs log tree commit diff
path: root/nixos/modules/services/monitoring
diff options
context:
space:
mode:
authorParnell Springmeyer <parnell@digitalmentat.com>2017-02-13 17:16:28 -0600
committerParnell Springmeyer <parnell@digitalmentat.com>2017-02-13 17:16:28 -0600
commit9e36a58649199a16a15cba3c78966ab0538a6fd7 (patch)
tree289d50ecf1068cfac80bdeabdd34d2d42ecbd755 /nixos/modules/services/monitoring
parent128bdac94fe8173845e162c61ddb83cb4b8ed8de (diff)
parent486b9be579fc1f046671ddaf1157f084ba956bdd (diff)
downloadnixlib-9e36a58649199a16a15cba3c78966ab0538a6fd7.tar
nixlib-9e36a58649199a16a15cba3c78966ab0538a6fd7.tar.gz
nixlib-9e36a58649199a16a15cba3c78966ab0538a6fd7.tar.bz2
nixlib-9e36a58649199a16a15cba3c78966ab0538a6fd7.tar.lz
nixlib-9e36a58649199a16a15cba3c78966ab0538a6fd7.tar.xz
nixlib-9e36a58649199a16a15cba3c78966ab0538a6fd7.tar.zst
nixlib-9e36a58649199a16a15cba3c78966ab0538a6fd7.zip
Merging against upstream master
Diffstat (limited to 'nixos/modules/services/monitoring')
-rw-r--r--nixos/modules/services/monitoring/grafana.nix9
1 files changed, 5 insertions, 4 deletions
diff --git a/nixos/modules/services/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix
index b9e4015c2380..97806d5d83eb 100644
--- a/nixos/modules/services/monitoring/grafana.nix
+++ b/nixos/modules/services/monitoring/grafana.nix
@@ -1,4 +1,4 @@
-{ config, lib, pkgs, ... }:
+{ options, config, lib, pkgs, ... }:
 
 with lib;
 
@@ -232,9 +232,10 @@ in {
   };
 
   config = mkIf cfg.enable {
-    warnings = [
-      "Grafana passwords will be stored as plaintext in the Nix store!"
-    ];
+    warnings = optional (
+      cfg.database.password != options.services.grafana.database.password.default ||
+      cfg.security.adminPassword != options.services.grafana.security.adminPassword.default
+    ) "Grafana passwords will be stored as plaintext in the Nix store!";
 
     environment.systemPackages = [ cfg.package ];