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, ...}: {
programs.git-credential-oauth.enable = true;
programs.git = {
@ -13,13 +15,34 @@
pull.autostash = true;
rebase.autostash = true;
rebase.autosquash = true;
push.autoSetupRemote = true;
commit.gpgsign = 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";
# credential.helper = "oauth";
credential = {
"https://git.yadunut.dev" = {
oauthClientId = "a4792ccc-144e-407e-86c9-5e7d8d9c3269";

View File

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

View File

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