dotfiles/modules/git.nix

38 lines
760 B
Nix
Raw Normal View History

2022-08-27 10:57:48 -04:00
{ config, lib, pkgs, ... }:
{
programs = {
gh = {
enable = true;
settings = {
git_protocol = "ssh";
};
};
2022-08-27 10:57:48 -04:00
git = {
enable = true;
userName = "James Walker";
userEmail = "walkah@walkah.net";
aliases = {
lg =
"log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
st = "status -s";
undo = "reset HEAD~1 --mixed";
};
extraConfig = {
github.user = "walkah";
init.defaultBranch = "main";
pull.rebase = true;
rebase.autoStash = true;
};
signing = {
key = "8896FEC44D47A81C";
signByDefault = true;
};
};
};
}