add git config

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
ahuston-0 2024-04-13 13:42:56 -04:00 committed by Alice Huston
parent 6dc2815e8b
commit 13481e49d2
2 changed files with 28 additions and 0 deletions

View File

@ -5,6 +5,7 @@
./home/zsh.nix
./home/doom
./home/gammastep.nix
./home/git.nix
];
home = {

27
users/alice/home/git.nix Normal file
View File

@ -0,0 +1,27 @@
{
config,
lib,
pkgs,
...
}:
{
programs.git = {
enable = true;
signing = {
key = "F63832C3080D6E1AC77EECF80B4245FFE305BC82";
signByDefault = true;
};
userEmail = "aliceghuston@gmail.com";
userName = "ahuston-0";
includes.config.contents = {
alias = {
gone =
!"git fetch -p && git for-each-ref --format '%(refname:short) %(upstream:track)' | awk '$2 == \"[gone]\" {print $1}' | xargs -r git branch -D";
};
push.autosetupremote = true;
pull.rebase = true;
color.ui = true;
};
};
}