{ deprekages, pkgs, ... }:
let
	difft = "${pkgs.difftastic}/bin/difft";
in
{

  #
  # Git.
  #
  programs.git = {
    enable = true;
    lfs.enable = true;

    # Note: we no longer set a name, here, forcing us to choose our e-mail and username
    # on a per-project basis.

    extraConfig = {
      # Use main as our branch names.
      init.defaultBranch = "main";

      #
      # Use difftastic.
      #
      alias = {
        dlog = "-c diff.external=${difft} log --ext-diff";
        dshow = "-c diff.external=${difft} show --ext-diff";
        ddiff = "-c diff.external=${difft} diff";
        dl = "-c diff.external=${difft} log -p --ext-diff";
        ds = "-c diff.external=${difft} show --ext-diff";
        dd = "-c diff.external=${difft} diff";
      };

      #
      # Use mergiraf.
      #

      # Set up the merge driver...
      merge.mergiraf = {
        name = "mergiraf";
        driver = "${deprekages.mergiraf}/bin/mergiraf merge --git %O %A %B -s %S -x %X -y %Y -p %P";
      };

      # ... and set when to use it.
      core.attributesFile = toString (
        pkgs.writeText ".gitattributes" ''
          				*.java merge=mergiraf
                  *.rs merge=mergiraf
                  *.go merge=mergiraf
                  *.js merge=mergiraf
                  *.jsx merge=mergiraf
                  *.json merge=mergiraf
                  *.yml merge=mergiraf
                  *.yaml merge=mergiraf
                  *.html merge=mergiraf
                  *.htm merge=mergiraf
                  *.xhtml merge=mergiraf
                  *.xml merge=mergiraf
                  *.c merge=mergiraf
                  *.cc merge=mergiraf
                  *.h merge=mergiraf
                  *.cpp merge=mergiraf
                  *.hpp merge=mergiraf
                  *.cs merge=mergiraf
                  *.dart merge=mergiraf
            		''
      );

    };
  };

}
