2022-08-05 21:09:52 -03:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-01-23 00:35:40 -03:00
|
|
|
let inherit (pkgs.uservars) username mail;
|
2022-08-05 21:09:52 -03:00
|
|
|
in {
|
|
|
|
config = {
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = {
|
|
|
|
user = {
|
|
|
|
name = username;
|
|
|
|
email = mail.personal.user;
|
|
|
|
};
|
|
|
|
init.defaultBranch = "main";
|
|
|
|
commit.verbose = true;
|
2024-01-20 21:10:27 -03:00
|
|
|
push.autoSetupRemote = true;
|
2022-08-05 21:09:52 -03:00
|
|
|
pull.rebase = true;
|
|
|
|
merge.conflictStyle = "diff3";
|
|
|
|
rerere.enabled = true;
|
|
|
|
rebase = {
|
|
|
|
abbreviateCommands = true;
|
|
|
|
autoSquash = true;
|
|
|
|
autoStash = true;
|
|
|
|
};
|
|
|
|
pager = {
|
2022-10-18 20:04:46 -03:00
|
|
|
log = "${pkgs._diffr}/bin/_diffr | ${pkgs.kak-pager}/bin/kak-pager";
|
|
|
|
show = "${pkgs._diffr}/bin/_diffr | ${pkgs.kak-pager}/bin/kak-pager";
|
|
|
|
diff = "${pkgs._diffr}/bin/_diffr | ${pkgs.kak-pager}/bin/kak-pager";
|
2022-08-05 21:09:52 -03:00
|
|
|
};
|
|
|
|
alias = {
|
2022-10-24 19:53:27 -03:00
|
|
|
graph = "log --graph --oneline --branches";
|
2022-08-05 21:09:52 -03:00
|
|
|
root = "rev-parse --show-toplevel";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|