mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 08:28:11 +09:00
36 lines
926 B
Nix
36 lines
926 B
Nix
{ host, ... }:
|
|
{
|
|
programs.git = {
|
|
enable = true;
|
|
userName = "moons-14";
|
|
userEmail = "[email protected]";
|
|
|
|
ignores = [
|
|
".direnv/"
|
|
".envrc"
|
|
"!.envrc.example"
|
|
];
|
|
|
|
extraConfig = {
|
|
push.default = "simple";
|
|
credential.helper = "cache --timeout=7200";
|
|
init.defaultBranch = "main";
|
|
log.decorate = "full"; # Show branch/tag info in git log
|
|
log.date = "iso"; # ISO 8601 date format
|
|
# Conflict resolution style for readable diffs
|
|
merge.conflictStyle = "diff3";
|
|
};
|
|
# Optional: FOSS-friendly Git aliases
|
|
aliases = {
|
|
br = "branch --sort=-committerdate";
|
|
co = "checkout";
|
|
df = "diff";
|
|
com = "commit -a";
|
|
gs = "stash";
|
|
gp = "pull";
|
|
lg = "log --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%d%Creset %s %C(green)(%cr)%C(bold blue) <%an>%Creset' --abbrev-commit";
|
|
st = "status";
|
|
};
|
|
};
|
|
}
|