zaneyos/modules/home/cli/git.nix
Don Williams 9bc46719d5 Fixed nvim error, and eval warnings for GTK/GIT
On branch main
 Your branch is up to date with 'origin/main'.

 Changes to be committed:
	modified:   CHANGELOG.md
	modified:   modules/home/cli/git.nix
	modified:   modules/home/editors/nixvim.nix
	modified:   modules/home/gtk.nix
2026-03-24 00:59:16 -04:00

36 lines
1.1 KiB
Nix

{host, ...}: let
inherit (import ../../../hosts/${host}/variables.nix) gitUsername gitEmail;
in {
programs.git = {
enable = true;
signing.format = null;
settings = {
user = {
name = "${gitUsername}";
email = "${gitEmail}";
};
# FOSS-friendly settings
push.default = "simple"; # Match modern push behavior
credential.helper = "cache --timeout=7200";
init.defaultBranch = "main"; # Set default new branches to '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
alias = {
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";
};
};
};
}