git: move from module to user config

This commit is contained in:
2025-03-16 13:58:50 +00:00
parent cbc31f1083
commit dd637cb1ae
10 changed files with 43 additions and 75 deletions

View File

@ -31,6 +31,7 @@ in
home-manager.users.${name} = {
imports = [
./git.nix
./shell.nix
];

42
users/jordan/git.nix Normal file
View File

@ -0,0 +1,42 @@
{
...
}:
{
home.programs.git = {
enable = true;
aliases = {
amend = "commit --amend";
lg = "log --color --graph --abbrev-commit --";
ls = "ls-files";
unadd = "reset HEAD";
undo-commit = "reset --soft \"HEAD^\"";
};
ignores = [
".Trash-*"
"[._]*.s[a-v][a-z]"
"[._]*.sw[a-p]"
"[._]s[a-rt-v][a-z]"
"[._]ss[a-gi-z]"
"[._]sw[a-p]"
"Session.vim"
"Sessionx.vim"
".netrwhist"
"*~"
"tags"
"[._]*.un~"
"cmake-build-*/"
];
userEmail = "jordan@vimium.com";
userName = "Jordan Holt";
signing = {
key = "B8CFFF61F1CCF520";
signByDefault = true;
};
extraConfig = {
rebase.autosquash = true;
push.default = "current";
pull.rebase = true;
};
};
}