anchor.diff:          ${optionalString (cfg.smtp.passwordFile != null) ''
             export GF_SMTP_PASSWORD="$(cat ${escapeShellArg cfg.smtp.passwordFile})"
           ''}
  +        ${optionalString cfg.provision.enable ''
  +          export GF_PATHS_PROVISIONING=${provisionConfDir};
  +        ''}
           exec ${cfg.package.bin}/bin/grafana-server -homepath ${cfg.dataDir}
         '';
         serviceConfig = {
  
positive.code:     SMTP_FROM_ADDRESS = cfg.smtp.fromAddress;
    } // cfg.extraOptions;
  
  in {
    options.services.grafana = {
      enable = mkEnableOption "grafana";
  
negative.code:         default = "unlimited";
          example = 14400;
          type = types.either types.int (types.enum [ "unlimited" ]);
        };
      };
  
      provision = {
        enable = mkEnableOption "provision";
        datasources = mkOption {
          description = "Grafana datasources configuration";
          default = [];
          type = types.listOf grafanaTypes.datasourceConfig;
          apply = x: map _filter x;
        };
        dashboards = mkOption {
          description = "Grafana dashboard configuration";
          default = [];
          type = types.listOf grafanaTypes.dashboardConfig;
          apply = x: map _filter x;
        };
      };
  
  