From 37a9ac7ddc3c24de5736f96c772a35a4adb48ec3 Mon Sep 17 00:00:00 2001 From: DemonKingSwarn Date: Mon, 20 Apr 2026 12:13:55 +0530 Subject: git config added --- config/git.nix | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 config/git.nix (limited to 'config/git.nix') diff --git a/config/git.nix b/config/git.nix new file mode 100644 index 0000000..4b75f9c --- /dev/null +++ b/config/git.nix @@ -0,0 +1,80 @@ +{ ... }: +{ + xdg.enable = true; + + programs.git = { + enable = true; + + settings = { + user = { + name = "DemonKingSwarn"; + email = "rockingswarn@gmail.com"; + }; + + init = { + defaultBranch = "master"; + }; + + core = { + compression = 4; + whitespace = "error"; + preloadIndex = true; + }; + + advice = { + addEmptyPathspec = false; + pushNonFastForward = false; + statusHints = false; + }; + + status = { + branch = true; + showStash = true; + showUntrackedFiles = "all"; + }; + + diff = { + context = 3; + renames = "copies"; + interHunkContext = 10; + }; + + push = { + autoSetupRemote = true; + default = "current"; + followTags = true; + }; + + pull = { + rebase = true; + }; + + rebase = { + autoStash = true; + missingCommitsCheck = "warn"; + }; + + http = { + sslVerify = false; + version = "HTTP/1.1"; + }; + + gpg.format = "ssh"; + + url = { + "git@github.com:demonkingswarn/" = { + insteadOf = "dks:/"; + }; + "git@github.com:" = { + insteadOf = "gh:"; + }; + }; + + credential = { + "https://github.com".helper = [ "" "!/usr/bin/gh auth git-credential" ]; + "https://gist.github.com".helper = [ "" "!/usr/bin/gh auth git-credential" ]; + }; + + }; + }; +} -- cgit v1.1