nix-infra/modules/home/git/default.nix

25 lines
656 B
Nix
Raw Normal View History

2024-03-24 18:02:45 +00:00
{ ... }: {
programs.git = {
enable = true;
extraConfig = {
init = { defaultBranch = "main"; };
core = { editor = "nvim"; };
pull.rebase = true;
2024-04-06 10:19:07 +00:00
push.autoSetupRemote = true;
2024-03-24 18:02:45 +00:00
};
aliases = {
a = "add";
ai = "add -p";
br = "branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate";
c = "commit";
del = "branch -D";
p = "push";
pf = "push --force-with-lease";
r = "rebase";
ri = "rebase -i";
s = "status";
sw = "switch";
};
};
}