<commit_before>import ../../make-test-python.nix ({ lib, pkgs, ... }:

let
  inherit (lib) mkMerge nameValuePair maintainers;

  baseGrafanaConf = {
    services.grafana = {
      enable = true;
      provision.enable = true;
      settings = {
        analytics.reporting_enabled = false;

        server = {
          http_addr = "localhost";
          domain = "localhost";
        };

        security = {
          admin_user = "testadmin";
          admin_password = "<PASSWORD>";
        };
      };
    };

    systemd.tmpfiles.rules = [
      "L /var/lib/grafana/dashboards/test.json 0700 grafana grafana - ${pkgs.writeText "test.json" (builtins.readFile ./test_dashboard.json)}"<commit_msg>nixos/tests/grafana: demonstrate how to use the file provider<commit_after>import ../../make-test-python.nix ({ lib, pkgs, ... }:

let
  inherit (lib) mkMerge nameValuePair maintainers;

  baseGrafanaConf = {
    services.grafana = {
      enable = true;
      provision.enable = true;
      settings = {
        analytics.reporting_enabled = false;

        server = {
          http_addr = "localhost";
          domain = "localhost";
        };

        security = {
          admin_user = "testadmin";
          admin_password = <PASSWORD>{${pkgs.writeText "pwd" "<PASSWORD>"}}";
        };
      };
    };

    systemd.tmpfiles.rules = [
      "L /var/lib/grafana/dashboards/test.json 0700 grafana grafana - ${pkgs.writeText "test.json" (builtins.readFile ./test_dashboard.json)}"
{'fraction_non_alphanumeric': 0.13737373737373737, 'fraction_numerical': 0.0053872053872053875, 'mean_word_length': 2.195698924731183, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5204729', 'n_tokens_mistral': 479, 'n_tokens_neox': 461, 'n_words': 86}