nixos-config/user/git.nix

44 lines
1 KiB
Nix
Raw Permalink Normal View History

{
config,
pkgs,
lib,
...
}:
let
2024-06-05 01:18:48 -03:00
inherit (config.my) username mail;
in
{
2022-08-05 21:09:52 -03:00
config = {
programs.git = {
enable = true;
2024-05-25 01:03:51 -03:00
lfs.enable = true;
2022-08-05 21:09:52 -03:00
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";
};
};
};
};
}