feat: add more git defaults

This commit is contained in:
Yadunand Prem 2025-02-25 09:35:53 -05:00
parent 807faf0e43
commit 50767ba3d0
No known key found for this signature in database
3 changed files with 32 additions and 10 deletions

View File

@ -1,3 +1,5 @@
# https://blog.gitbutler.com/how-git-core-devs-configure-git/
{pkgs, ...}: { {pkgs, ...}: {
programs.git-credential-oauth.enable = true; programs.git-credential-oauth.enable = true;
programs.git = { programs.git = {
@ -13,13 +15,34 @@
pull.autostash = true; pull.autostash = true;
rebase.autostash = true; rebase.autostash = true;
rebase.autosquash = true;
push.autoSetupRemote = true; push.autoSetupRemote = true;
commit.gpgsign = true; commit.gpgsign = true;
commit.verbose = true; commit.verbose = true;
merge.conflictstyle = "zdiff3";
diff.colorMoved = true;
diff.algorithm = "histogram";
feature.experimental = true;
branch.sort = "committerdate";
diff.mnemonicPrefix = true;
fetch.all = true;
column.ui = "auto";
tags.sort = "version:refname";
push.followTags = true;
rerere.enabled = true;
rerere.autoupdate = true;
rebase.updateRefs = true;
gpg.format = "ssh"; gpg.format = "ssh";
# credential.helper = "oauth";
credential = { credential = {
"https://git.yadunut.dev" = { "https://git.yadunut.dev" = {
oauthClientId = "a4792ccc-144e-407e-86c9-5e7d8d9c3269"; oauthClientId = "a4792ccc-144e-407e-86c9-5e7d8d9c3269";

View File

@ -30,15 +30,15 @@
sources.formatting.ocamlformat.enable = true; sources.formatting.ocamlformat.enable = true;
}; };
lsp = { lsp = {
package = pkgs.vimUtils.buildVimPlugin { # package = pkgs.vimUtils.buildVimPlugin {
name = "lsp"; # name = "lsp";
src = pkgs.fetchFromGitHub { # src = pkgs.fetchFromGitHub {
owner = "neovim"; # owner = "neovim";
repo = "nvim-lspconfig"; # repo = "nvim-lspconfig";
rev = "541f3a2781de481bb84883889e4d9f0904250a56"; # rev = "541f3a2781de481bb84883889e4d9f0904250a56";
hash = "sha256-f9CqwKBWZgC2ystm+g7FmsHR0fLcM6Wj+GkSwoUIanw="; # hash = "sha256-f9CqwKBWZgC2ystm+g7FmsHR0fLcM6Wj+GkSwoUIanw=";
}; # };
}; # };
enable = true; enable = true;
servers = { servers = {
gleam.enable = true; gleam.enable = true;

View File

@ -40,7 +40,6 @@
pkgs.jq pkgs.jq
pkgs.nixfmt-rfc-style pkgs.nixfmt-rfc-style
pkgs.just pkgs.just
pkgs.pyright
pkgs.rsync pkgs.rsync
pkgs.k9s pkgs.k9s
pkgs.nil # nix lsp pkgs.nil # nix lsp