dotfiles/nixos/git/home.nix

34 lines
982 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
{
programs.git = {
enable = true;
lfs.enable = true;
userName = "Cyryl Płotnicki";
userEmail = "cyplo@cyplo.net";
2020-10-17 13:37:33 +01:00
delta = {
enable = true;
2020-10-17 13:46:44 +01:00
options = {
line-numbers = true;
syntax-theme = "Solarized (dark)";
};
2020-10-17 13:37:33 +01:00
};
extraConfig = {
2020-08-01 08:33:33 +01:00
colour.ui = true;
2020-12-19 12:58:24 +00:00
credential = { helper ="cache"; };
diff.renameLimit = 2048;
diff.renames = "copy";
2020-08-01 08:33:33 +01:00
help.autocorrect = 1;
mergetool.keepBackup = false;
2020-12-19 12:58:24 +00:00
pull.ff = "only";
push.default = "simple";
};
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";
vacuum = "!git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs -r git branch -D && git gc --aggressive --auto";
};
};
}