Add git and gpg configs
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -1,6 +1,23 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
key = null;
|
||||
};
|
||||
extraConfig.credential.helper = "store";
|
||||
hooks = {
|
||||
commit-msg = pkgs.writeScript "git-commit-msg" ''
|
||||
#!${pkgs.runtimeShell}
|
||||
|
||||
git interpret-trailers --if-exists doNothing --trailer \
|
||||
"Signed-off-by: $(git config user.name) <$(git config user.email)>" \
|
||||
--in-place "$1"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user