Refactor git modules
This commit is contained in:
parent
84065395ba
commit
d8fc5590e4
5 changed files with 47 additions and 4 deletions
63
modules/git/home.nix
Normal file
63
modules/git/home.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git-credential-oauth = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
||||
ignores = [
|
||||
"**/.claude/settings.local.json"
|
||||
".DS_Store"
|
||||
".env"
|
||||
"node_modules/"
|
||||
".venv/"
|
||||
];
|
||||
|
||||
settings = {
|
||||
user = {
|
||||
name = "Yan Lin";
|
||||
email = "github@yanlincs.com";
|
||||
};
|
||||
|
||||
credential = {
|
||||
"https://github.com".helper = "oauth";
|
||||
"https://gitlab.com".helper = "oauth";
|
||||
"https://bitbucket.org".helper = "oauth";
|
||||
"https://git.overleaf.com".helper = "store";
|
||||
"https://git.overleaf.com".username = "git";
|
||||
};
|
||||
|
||||
core = {
|
||||
editor = "nvim";
|
||||
autocrlf = "input";
|
||||
ignorecase = false;
|
||||
};
|
||||
|
||||
init.defaultBranch = "main";
|
||||
|
||||
push = {
|
||||
default = "simple";
|
||||
autoSetupRemote = true;
|
||||
};
|
||||
|
||||
pull = {
|
||||
rebase = true;
|
||||
};
|
||||
|
||||
merge = {
|
||||
conflictstyle = "diff3";
|
||||
};
|
||||
|
||||
diff = {
|
||||
colorMoved = "default";
|
||||
};
|
||||
|
||||
status = {
|
||||
showUntrackedFiles = "all";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue