Support gitconfig with home-manager

- Migrate configuration from .gitconfig to home-manager.
- Delete .gitconfig.
- Delete .gitignore because I'm not using OSX anymore.
This commit is contained in:
William Carroll 2020-03-05 14:06:14 +00:00
parent 0cb1086adc
commit 3b689f03de
3 changed files with 21 additions and 28 deletions

View file

@ -15,6 +15,27 @@
path = builtins.toPath ~/home-manager;
};
programs.git = {
enable = true;
userName = "William Carroll";
userEmail = "wpcarro@gmail.com";
aliases = {
today = "! git log --date=relative --since=00:00:00 --all --no-merges --oneline --author=\"$(git config --get user.email)\"";
yday = "! git log --since=yesterday.midnight --until=today.midnight --oneline --author=\"$(git config --get user.email)\"";
changed-files = "! git --no-pager diff --name-only $(current_branch) $(git merge-base $(current_branch) master)";
conflicts = "! git --no-pager diff --name-only --diff-filter=U";
unstage = "reset HEAD --";
};
extraConfig = {
push.default = "current";
rebase = {
autosquash = true;
autostash = true;
};
rerere.enabled = true;
};
};
##############################################################################
# Services
##############################################################################