{ config, identity, pkgs, ... }: {
  home.packages = with pkgs; [ diff-so-fancy ];

  home.file.".ssh/id_ed25519.pub".text = identity.sshPublicKey;

  programs.git = {
    enable = true;
    settings = {
      user = {
        name       = identity.fullName;
        email      = identity.email;
        signingKey = "${config.home.homeDirectory}/.ssh/id_ed25519";
      };
      core = {
        compression  = 9;
        whitespace   = "error";
        preloadindex = true;
      };
      advice = {
        addEmptyPathspec   = false;
        pushNonFastForward = false;
        statusHints        = false;
      };
      init.defaultBranch = "main";
      status = {
        branch             = true;
        showStash          = true;
        showUntrackedFiles = "all";
      };
      diff = {
        context          = 3;
        rename           = "copies";
        interHunkContext = 10;
      };
      pager = {
        diff   = "diff-so-fancy | $PAGER";
        branch = false;
        tag    = false;
      };
      diff-so-fancy.markEmptyLines = false;
      interactive = {
        diffFilter = "diff-so-fancy --patch";
        singlekey  = true;
      };
      push = {
        autoSetupRemote = true;
        default         = "current";
        followTags      = true;
      };
      pull = {
        default = "current";
        rebase  = true;
      };
      rebase = {
        autoStash           = true;
        missingCommitsCheck = "warn";
      };
      log = {
        abbrevCommit = true;
        graphColors  = "blue,yellow,cyan,magenta,green,red";
      };
      branch.sort = "-committerdate";
      tag.sort    = "-taggerdate";
      commit.gpgSign = true;
      gpg.format     = "ssh";
      url = {
        "git@github.com:ZotyDev/".insteadOf      = "zoty:";
        "git@github.com:UnnamedEngine/".insteadOf = "unen:";
        "git@github.com:Taumaturgo/".insteadOf    = "taumaturgo:";
      };
    };
  };
}
