mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 03:53:47 +00:00
nixos/grafana: Don't print password warning if no password has been set
This commit is contained in:
parent
46904e9c3a
commit
cda4a4dcfc
@ -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 ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user