# Git configuration with signing, aliases, and global ignore.
# Identity and host-specific SSH keys are set per-host in home/m3tam3re/.
{
  lib,
  pkgs,
  ...
}:
with lib; {
  programs.git = {
    enable = true;
    signing.format = null;
    settings = {
      user = {
        name = lib.mkDefault "m3tam3re";
        email = lib.mkDefault "p@m3ta.dev";
      };
      core.excludesfile = "~/.gitignore_global";
      init.defaultBranch = "master";
      alias = {
        st = "status";
        logd = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
      };
    };
  };

  programs.difftastic.enable = true;

  programs.jujutsu = {
    enable = true;
    settings = {
      user = {
        email = "m@m3tam3re.com";
        name = "Sascha Koenig";
      };
    };
  };

  home.packages = with pkgs; [
    lazygit
  ];
}
