Tweak git a little more

This commit is contained in:
Nathan McCarty 2023-03-11 18:43:11 -05:00
parent e6d6e08621
commit 62c1d1c50d
No known key found for this signature in database
2 changed files with 16 additions and 1 deletions

View File

@ -66,6 +66,13 @@ with lib; {
tmate tmate
]; ];
}) })
(mkIf (config.nathan.programs.util.git.enable
&& config.nathan.programs.util.git.gpgSign) {
programs.git.signing = {
key = lib.mkDefault "B7A40A5D78C08885";
signByDefault = lib.mkDefault config.nathan.programs.util.git.gpgSign;
};
})
(mkIf config.nathan.programs.util.git.enable { (mkIf config.nathan.programs.util.git.enable {
# Git adjacent packages # Git adjacent packages
home.packages = [ home.packages = [
@ -80,7 +87,7 @@ with lib; {
userName = "Nathan McCarty"; userName = "Nathan McCarty";
userEmail = "nathan@mccarty.io"; userEmail = "nathan@mccarty.io";
signing = { signing = {
key = "B7A40A5D78C08885"; key = lib.mkDefault "B7A40A5D78C08885";
signByDefault = config.nathan.programs.util.git.gpgSign; signByDefault = config.nathan.programs.util.git.gpgSign;
}; };
ignores = [ ignores = [

View File

@ -22,4 +22,12 @@
}; };
}; };
}; };
# Setup git commit signing with ssh key
programs.git = {
extraConfig = {
commit.gpgsign = true;
gpg.format = "ssh";
user.signingkey = "~/.ssh/id_ed25519.pub";
};
};
} }