diff --git a/git.nix b/git.nix index 5e8093e..8f6e0ca 100644 --- a/git.nix +++ b/git.nix @@ -7,6 +7,41 @@ delta.enable = true; extraConfig = { init.defaultBranch = "main"; + push.default = "current"; + color.ui = "auto"; + alias = { + aa = "add --all"; + ap = "add --patch"; + branches = ''for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes''; + ci = "commit -v"; + co = "checkout"; + pf = "push --force-with-lease"; + st = "status"; + }; + core = { + excludesfile = "~/.gitignore"; + autocrlf = "input"; + }; + merge = { + ff = "only"; + conflictstyle = "diff3"; + }; + fetch.prune = true; + rebase.autosquash = true; + diff.colorMoved = "default"; + delta = { + navigate = true; + light = false; + }; + sendemail = { + smtpserver = "smtp.fastmail.com"; + smtpuser = "nora@nora.codes"; + smtpencryption = "ssl"; + smtpserverport = "465"; + smtppass = "c75fkegmmwlndhnz"; + }; }; }; + + home.file.".gitignore".source = ./rcfiles/gitignore; } diff --git a/rcfiles/gitignore b/rcfiles/gitignore new file mode 100644 index 0000000..b9c9b47 --- /dev/null +++ b/rcfiles/gitignore @@ -0,0 +1,17 @@ +*.pyc +*.sw[nop] +.DS_Store +.bundle +.byebug_history +.env +.git/ +/bower_components/ +/log +/node_modules/ +/tmp +/vendor +db/*.sqlite3 +log/*.log +rerun.txt +tmp/**/* +/tags