{ pkgs, useGCM ? false }:

let
  secrets = import ../secrets.nix;
  gcm = {
    credential = {
      helper = "/mnt/c/Program\\ Files/Git/mingw64/bin/git-credential-manager.exe";
    };
  };
in with secrets;
{
  enable = true;
  aliases = {
	  lg = "log --graph --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative";
	  ll = "!git st; git --no-pager log --pretty='format:%Cred%cr %Cblue%h %Cgreen%an:%Creset %s%C(yellow)%d' -n20; echo";
	  # Nice list of branches by age
	  bb = "for-each-ref --sort=-committerdate --format='%1B[36m%(committerdate:relative) %1B[33m%(refname:short)%1B[0;m' refs/heads/";
	  info = "config --list";
  };
  ignores = [
    "dist"
    ".cabal-sandbox"
    "cabal.sandbox.config"
    ".stack-work"
    "*.o"
    "*.hi"
  ];
  signing = {
    key = "D02BC6E095A0446267E1F43C0133D0C73A765B52";
  };
  extraConfig = if useGCM then gcm else {};
  userEmail = "${email}";
  userName = "${realName}";
  lfs.enable = true;
}

