From 73872b507aead1dc332c53776ba8644b1951169d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Tue, 22 Oct 2019 11:57:34 +0100 Subject: [PATCH] Encode git config in home manager --- nixos/programs/git.nix | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/nixos/programs/git.nix b/nixos/programs/git.nix index 6701e523..8169b805 100644 --- a/nixos/programs/git.nix +++ b/nixos/programs/git.nix @@ -4,8 +4,18 @@ enable = true; userName = "Cyryl PÅ‚otnicki"; userEmail = "cyplo@cyplo.net"; - includes = [ - { path = "../.gitconfig.linux.private"; } - ]; - }; -} + extraConfig = { + core = { pager = "cat"; }; + pager = { + diff = "diff-so-fancy | less --tabs=1,5 -RFX"; + show = "diff-so-fancy | less --tabs=1,5 -RFX"; + }; + }; + aliases = + { + tree = "log --show-signature --color --decorate --date=short --all --graph -n 3"; + newbranch = "!git checkout master && git fetch -p && git reset --hard origin/master && git checkout -b $2"; + head = "log HEAD -n1"; + }; + }; + }