dotfiles/nixos/home-manager/programs/git.nix

24 lines
676 B
Nix
Raw Normal View History

2019-08-04 20:13:54 +01:00
{ config, pkgs, lib, ... }:
{
programs.git = {
enable = true;
2020-01-22 22:47:43 +00:00
lfs.enable = true;
2019-08-04 20:13:54 +01:00
userName = "Cyryl Płotnicki";
userEmail = "cyplo@cyplo.net";
2019-10-22 11:57:34 +01:00
extraConfig = {
2020-06-13 13:06:51 +01:00
credential = { helper ="cache"; };
2019-10-22 11:57:34 +01:00
core = { pager = "cat"; };
pager = {
diff = "diff-so-fancy | less --tabs=1,5 -RFX";
show = "diff-so-fancy | less --tabs=1,5 -RFX";
};
};
aliases =
{
tree = "log --show-signature --color --decorate --date=short --all --graph -n 3";
newbranch = "!git checkout master && git fetch -p && git reset --hard origin/master && git checkout -b $2";
head = "log HEAD -n1";
};
};
}