{
  config,
  lib,
  pkgs,
  ...
}:
{
  home.packages = [ pkgs.git-sync ];
  programs.git =
    let
      package = pkgs.git.override {
        withLibsecret = true;
        withSsh = true;
      };
    in
    {
      inherit package;
      enable = true;
      userName = "Evie Litherland-Smith";
      userEmail = lib.mkDefault "evie@xenia.me.uk";
      delta = {
        enable = true;
        options = {
          line-numbers = true;
          hyprlinks = true;
          navigate = true;
          side-by-side = true;
          syntax-theme = lib.mkIf config.programs.bat.enable config.programs.bat.config.theme;
        };
      };
      attributes = [
        "*.gpg filter=gpg diff=gpg"
        "*.asc filter=gpg diff=gpg"
      ];
      extraConfig = {
        github.user = "pixelifytica";
        pull.rebase = false;
        init.defaultBranch = "main";
        merge.conflictstyle = "diff3";
        credential.helper = "${package}/bin/git-credential-libsecret";
        diff = {
          colorMoved = "default";
          gpg.textconv = "gpg --no-tty --decrypt";
        };
      };
    };
}