Files
bankrupt/home-manager/modules/git.nix
T
2025-11-15 23:45:33 +08:00

41 lines
890 B
Nix

# Git configuration - unified from common.nix and development.nix
{
inputs,
lib,
config,
pkgs,
...
}: {
programs.git = {
enable = true;
# TODO: Configure your git identity
# userName = "Your Name";
# userEmail = "your.email@example.com";
extraConfig = {
# From common.nix
init.defaultBranch = "main";
pull.rebase = true;
push.autoSetupRemote = true;
# From development.nix
core.editor = "vim";
merge.conflictstyle = "diff3";
diff.algorithm = "histogram";
};
# Git aliases
aliases = {
st = "status";
co = "checkout";
br = "branch";
ci = "commit";
unstage = "reset HEAD --";
last = "log -1 HEAD";
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
};
};
}