diff options
Diffstat (limited to 'nixos/modules/services/monitoring/grafana.nix')
-rw-r--r-- | nixos/modules/services/monitoring/grafana.nix | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/nixos/modules/services/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix index 97806d5d83e..4fbacef788f 100644 --- a/nixos/modules/services/monitoring/grafana.nix +++ b/nixos/modules/services/monitoring/grafana.nix @@ -5,8 +5,6 @@ with lib; let cfg = config.services.grafana; - b2s = val: if val then "true" else "false"; - envOptions = { PATHS_DATA = cfg.dataDir; PATHS_PLUGINS = "${cfg.dataDir}/plugins"; @@ -32,16 +30,16 @@ let SECURITY_ADMIN_PASSWORD = cfg.security.adminPassword; SECURITY_SECRET_KEY = cfg.security.secretKey; - USERS_ALLOW_SIGN_UP = b2s cfg.users.allowSignUp; - USERS_ALLOW_ORG_CREATE = b2s cfg.users.allowOrgCreate; - USERS_AUTO_ASSIGN_ORG = b2s cfg.users.autoAssignOrg; + USERS_ALLOW_SIGN_UP = boolToString cfg.users.allowSignUp; + USERS_ALLOW_ORG_CREATE = boolToString cfg.users.allowOrgCreate; + USERS_AUTO_ASSIGN_ORG = boolToString cfg.users.autoAssignOrg; USERS_AUTO_ASSIGN_ORG_ROLE = cfg.users.autoAssignOrgRole; - AUTH_ANONYMOUS_ENABLED = b2s cfg.auth.anonymous.enable; + AUTH_ANONYMOUS_ENABLED = boolToString cfg.auth.anonymous.enable; AUTH_ANONYMOUS_ORG_NAME = cfg.auth.anonymous.org_name; AUTH_ANONYMOUS_ORG_ROLE = cfg.auth.anonymous.org_role; - ANALYTICS_REPORTING_ENABLED = b2s cfg.analytics.reporting.enable; + ANALYTICS_REPORTING_ENABLED = boolToString cfg.analytics.reporting.enable; } // cfg.extraOptions; in { |