From 12d630705c03ac0fd44b1e5136a3a89f449a6ade Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Mon, 20 Jun 2022 15:48:54 +0200 Subject: [PATCH] feat: configure git --- home-mandlm.nix | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/home-mandlm.nix b/home-mandlm.nix index c1bbee9..6a71534 100644 --- a/home-mandlm.nix +++ b/home-mandlm.nix @@ -29,15 +29,27 @@ userName = "Michael Mandl"; userEmail = "mandlm@molez.net"; extraConfig = { - core.editor = "nvim"; - fetch.writeCommitGraph = true; - format.pretty = "format:%C(yellow)%h %Cblue%>(12)%ad %C(red)%G? %Cgreen%<(7,trunc)%aN%Cred%d %Creset%s"; + user.private.name = "Michael Mandl"; + user.private.email = "mandlm@molez.net"; + user.private.signingkey = "4AA25D647AA54CC7"; + + user.swp.name = "Michael Mandl"; + user.swp.email = "mandl@vi-bim.de"; + user.swp.signingkey = "4E60F44227F611B4"; + + core.editor = "nvim"; + fetch.writeCommitGraph = true; + format.pretty = "format:%C(yellow)%h %Cblue%>(12)%ad %C(red)%G? %Cgreen%<(7,trunc)%aN%Cred%d %Creset%s"; init.defaultBranch = "main"; - log.date = "relative"; - pull.rebase = true; - rebase.autostash = true; - rerere.enabled = true; - worktree.guessRemote = true; + log.date = "relative"; + pull.rebase = true; + rebase.autostash = true; + rerere.enabled = true; + worktree.guessRemote = true; + }; + + aliases = { + identity = "! git config user.name \"$(git config user.$1.name)\"; git config user.email \"$(git config user.$1.email)\"; git config user.signingkey \"$(git config user.$1.signingkey)\"; :"; }; }; @@ -46,7 +58,7 @@ theme = "Solarized Dark"; font = { name = "DejaVu Sans Mono"; - size = 12; + size = 12; }; };