<commit_before>{ pkgs, lib, ... }:

{
  programs.git.enable = true;
  programs.git.ignores = [
    "*~"
  ];

  # TODO multiple "insteadOf"
  programs.git.userName = "<NAME>";

  # Need to override on work machines
  programs.git.userEmail = lib.mkDefault "<EMAIL>";

  programs.git.iniContent = {
    "push" = {
      default = "simple";
    };
    "merge" = {
      conflictstyle = "diff3";
    };
    "rerere" = {
      enabled = true;
    };
    "url \"ssh://git@gist.github.com\"" = {
      insteadOf = git://gist.github.com;
      "insteadOf " = https://gist.github.com;
      "insteadOf  " = http://gist.github.com;
    };
    "url \"ssh://git@github.com\"" = {
      insteadOf = git://github.com;
      "insteadOf " = https://github.com;
      "insteadOf  " = http://github.com;
    };
    "url \"ssh://git@gitlab.\"" = {
      insteadOf = git://gitlab.;
      "insteadOf " = https://gitlab.;
      "insteadOf  " = http://gitlab.;
    };
    "url \"ssh://git@bitbucket.com\"" = {
      insteadOf = git://bitbucket.com;
      "insteadOf " = https://bitbucket.com;
      "insteadOf  " = http://bitbucket.com;
    };
  };
  programs.git.package = pkgs.gitFull.override { guiSupport = true; };
}
<commit_msg>Add to git config for sending email<commit_after>{ pkgs, lib, ... }:

{
  programs.git.enable = true;
  programs.git.ignores = [
    "*~"
  ];

  # TODO multiple "insteadOf"
  programs.git.userName = "<NAME>";

  # Need to override on work machines
  programs.git.userEmail = lib.mkDefault "<EMAIL>";

  programs.git.iniContent = {
    "push" = {
      default = "simple";
    };
    "merge" = {
      conflictstyle = "diff3";
    };
    "rerere" = {
      enabled = true;
    };
    "url \"ssh://git@gist.github.com\"" = {
      insteadOf = git://gist.github.com;
      "insteadOf " = https://gist.github.com;
      "insteadOf  " = http://gist.github.com;
    };
    "url \"ssh://git@github.com\"" = {
      insteadOf = git://github.com;
      "insteadOf " = https://github.com;
      "insteadOf  " = http://github.com;
    };
    "url \"ssh://git@gitlab.\"" = {
      insteadOf = git://gitlab.;
      "insteadOf " = https://gitlab.;
      "insteadOf  " = http://gitlab.;
    };
    "url \"ssh://git@bitbucket.com\"" = {
      insteadOf = git://bitbucket.com;
      "insteadOf " = https://bitbucket.com;
      "insteadOf  " = http://bitbucket.com;
    };
    "sendemail" = {
      smtpEncryption = "tls";
      smtpServer = "smtp.fastmail.com";
      smtpUser = "<EMAIL>";
      smtpServerPort = 587;
    };
  };
  programs.git.package = pkgs.gitFull.override { guiSupport = true; };
}

{'fraction_non_alphanumeric': 0.19699884570988843, 'fraction_numerical': 0.001923816852635629, 'mean_word_length': 2.1363088057901085, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '3908759', 'n_tokens_mistral': 954, 'n_tokens_neox': 929, 'n_words': 147}