2022-06-26 12:42:49 +00:00
|
|
|
{ config, lib, pkgs, user, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
programs = {
|
|
|
|
git = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = {
|
|
|
|
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;
|
2022-07-07 07:25:17 +00:00
|
|
|
|
|
|
|
diff.external = "difft --background light";
|
|
|
|
diff.tool = "difftastic";
|
|
|
|
difftool.prompt = false;
|
|
|
|
difftool.difftastic.cmd = "difft --background light \"$LOCAL\" \"$REMOTE\"";
|
|
|
|
pager.difftool = true;
|
2022-06-26 12:42:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
aliases = {
|
2022-07-11 06:37:12 +00:00
|
|
|
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)"; git config commit.gpgsign "true"; : '';
|
|
|
|
clone-worktree = ''! mkdir $2; git clone $1 $2/.base; BRANCH=`git -C $2/.base symbolic-ref --short HEAD`; echo "branch is $BRANCH"; git -C $2/.base checkout --detach HEAD; git -C $2/.base worktree add ../$BRANCH; :'';
|
2022-07-12 07:25:58 +00:00
|
|
|
graph = "log --graph --all";
|
2022-06-26 12:42:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
ignores = [
|
|
|
|
".env"
|
|
|
|
".direnv"
|
|
|
|
"*.swp"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|