git: support not configuring signing.format (#6478)

This commit is contained in:
Austin Horstman 2025-02-17 03:00:03 -08:00 committed by GitHub
parent 30b9cd6f1a
commit 5c5697b82a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 52 additions and 47 deletions

View file

@ -6,5 +6,6 @@
git-with-signing-key-id-legacy = ./git-with-signing-key-id-legacy.nix;
git-with-signing-key-id = ./git-with-signing-key-id.nix;
git-without-signing-key-id = ./git-without-signing-key-id.nix;
git-without-signing = ./git-without-signing.nix;
git-with-hooks = ./git-with-hooks.nix;
}

View file

@ -1,11 +1,8 @@
[commit]
gpgSign = false
[gpg]
format = "openpgp"
[gpg "openpgp"]
program = "path-to-gpg"
program = "@gnupg@/bin/gpg"
[sendemail "hm-account"]
from = "H. M. Test Jr. <hm@example.org>"
@ -21,9 +18,6 @@
smtpSslCertPath = "/etc/ssl/certs/ca-certificates.crt"
smtpUser = "home.manager"
[tag]
gpgSign = false
[user]
email = "hm@example.com"
name = "H. M. Test"

View file

@ -8,7 +8,6 @@
programs.git = {
enable = true;
signing.signer = "path-to-gpg";
userEmail = "hm@example.com";
userName = "H. M. Test";
};

View file

@ -1,6 +1,3 @@
[commit]
gpgSign = false
[gpg]
format = "openpgp"
@ -19,9 +16,6 @@
from = "H. M. Test <hm@example.com>"
smtpServer = "@msmtp@/bin/msmtp"
[tag]
gpgSign = false
[user]
email = "hm@example.com"
name = "H. M. Test"

View file

@ -1,17 +1,11 @@
This can be anything.
[commit]
gpgSign = false
[gpg]
format = "openpgp"
[gpg "openpgp"]
program = "path-to-gpg"
[tag]
gpgSign = false
[user]
email = "user@example.org"
name = "John Doe"

View file

@ -0,0 +1,3 @@
[user]
email = "user@example.org"
name = "John Doe"

View file

@ -0,0 +1,16 @@
{
programs.git = {
enable = true;
userName = "John Doe";
userEmail = "user@example.org";
};
home.stateVersion = "25.05";
nmt.script = ''
assertFileExists home-files/.config/git/config
assertFileContent home-files/.config/git/config ${
./git-without-signing.conf
}
'';
}