From 0e96760c773cd8678bbe63617ede91d5d5792d58 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Fri, 15 Sep 2023 14:39:35 -0400 Subject: [PATCH] Manage most of my git configuration --- modules/home-manager/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index cf94d29..9f8422d 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -47,9 +47,23 @@ git = { enable = true; delta.enable = true; + includes = [ { path = "~/.gitconfig-local"; }]; lfs.enable = true; package = pkgs.gitAndTools.gitFull; - }; + userName = "Gene Liverman"; + extraConfig = { + init = { + defaultBranch = "main"; + }; + merge = { + conflictStyle = "diff3"; + tool = "meld"; + }; + pull = { + rebase = false; + }; + }; + }; # end git go = { enable = true; goPath = "go"; @@ -139,6 +153,7 @@ history.size = 1000000; initExtra = '' [ -f ~/.private-env ] && source ~/.private-env || echo '~/.private-env is missing' + [ -f ~/.gitconfig-local ] || echo '~/.gitconfig-local is missing. Create it and set user.email' # Start GPG agent # Some tips from https://hedberg.io/yubikey-for-ssh/ helped simplify this: