diff options
Diffstat (limited to 'nixos/modules/services/monitoring/grafana.nix')
-rw-r--r-- | nixos/modules/services/monitoring/grafana.nix | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/nixos/modules/services/monitoring/grafana.nix b/nixos/modules/services/monitoring/grafana.nix index 5c6f063b1493f..defbd9289dcd8 100644 --- a/nixos/modules/services/monitoring/grafana.nix +++ b/nixos/modules/services/monitoring/grafana.nix @@ -36,7 +36,9 @@ let USERS_AUTO_ASSIGN_ORG = b2s cfg.users.autoAssignOrg; USERS_AUTO_ASSIGN_ORG_ROLE = cfg.users.autoAssignOrgRole; - AUTH_ANONYMOUS_ENABLE = b2s cfg.auth.anonymous.enable; + AUTH_ANONYMOUS_ENABLED = b2s cfg.auth.anonymous.enable; + + ANALYTICS_REPORTING_ENABLED = b2s cfg.analytics.reporting.enable; } // cfg.extraOptions; in { @@ -196,6 +198,14 @@ in { }; }; + analytics.reporting = { + enable = mkOption { + description = "Whether to allow anonymous usage reporting to stats.grafana.net"; + default = true; + type = types.bool; + }; + }; + extraOptions = mkOption { description = '' Extra configuration options passed as env variables as specified in @@ -218,7 +228,7 @@ in { after = ["networking.target"]; environment = mapAttrs' (n: v: nameValuePair "GF_${n}" (toString v)) envOptions; serviceConfig = { - ExecStart = "${cfg.package}/bin/grafana -homepath ${cfg.dataDir}"; + ExecStart = "${cfg.package}/bin/grafana-server -homepath ${cfg.dataDir}"; WorkingDirectory = cfg.dataDir; User = "grafana"; }; |