60 lines
1.7 KiB
Nix
60 lines
1.7 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: let
|
|
user = config.pub-solar.user;
|
|
xdg = config.home-manager.users."${user.name}".xdg;
|
|
in '' [user]
|
|
${
|
|
if user.email != null
|
|
then "email = ${user.email}"
|
|
else ""
|
|
}
|
|
${
|
|
if user.name != null
|
|
then "name = ${user.name}"
|
|
else ""
|
|
}
|
|
${
|
|
if user.gpgKeyId != null
|
|
then "signingkey = ${user.gpgKeyId}"
|
|
else ""
|
|
}
|
|
[core]
|
|
editor = /etc/profiles/per-user/${config.pub-solar.user.name}/bin/nvim
|
|
excludesFile = /home/${config.pub-solar.user.name}/.config/git/global_gitignore
|
|
[alias]
|
|
pol = pull
|
|
ack = -c color.grep.linenumber=\"bold yellow\"\n -c color.grep.filename=\"bold green\"\n -c color.grep.match=\"reverse yellow\"\n grep --break --heading --line-number
|
|
lg = "!f() { \
|
|
git log --all --color --graph --pretty=format:'%C(bold yellow)<sig>%G?</sig>%C(reset) %C(red)%h%C(reset) -%C(yellow)%d%C(reset) %s %C(green)(%cr) %C(blue)<%an>%C(reset)' | \
|
|
sed \
|
|
-e 's#<sig>G</sig>#Good#' \
|
|
-e 's#<sig>B</sig>#\\nBAD \\nBAD \\nBAD \\nBAD \\nBAD#' \
|
|
-e 's#<sig>U</sig>#Unknown#' \
|
|
-e 's#<sig>X</sig>#Expired#' \
|
|
-e 's#<sig>Y</sig>#Expired Key#' \
|
|
-e 's#<sig>R</sig>#Revoked#' \
|
|
-e 's#<sig>E</sig>#Missing Key#' \
|
|
-e 's#<sig>N</sig>#None#' | \
|
|
less -r; \
|
|
}; f"
|
|
|
|
[mergetool]
|
|
prompt = false
|
|
[merge]
|
|
tool = nvim
|
|
[mergetool "nvim"]
|
|
cmd = /etc/profiles/per-user/${config.pub-solar.user.name}/bin/nvim -f -c \"Gdiffsplit!\" \"$MERGED\"
|
|
|
|
[commit]
|
|
gpgsign = true
|
|
template = ${xdg.configHome}/git/gitmessage
|
|
[tag]
|
|
gpgsign = true
|
|
[init]
|
|
defaultBranch = main
|
|
[pull]
|
|
rebase = false''
|