Enable git ssh code signing

This commit is contained in:
GHOSCHT 2023-10-15 14:29:15 +02:00
parent bbe2325d97
commit ed685e870f
No known key found for this signature in database
2 changed files with 14 additions and 0 deletions

View file

@ -6,10 +6,23 @@
...
}: {
home-manager.users.${vars.user} = {
home.file.".ssh/allowed_signers".text = "* ${builtins.readFile ../../rsc/config/git/git.pub}";
home.file.".ssh/git.pub" = {
source = ../../rsc/config/git/git.pub;
};
programs.git = {
enable = true;
userName = "GHOSCHT";
userEmail = "31184695+GHOSCHT@users.noreply.github.com";
extraConfig = {
# Sign all commits using ssh key
commit.gpgsign = true;
gpg.format = "ssh";
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
user.signingkey = "~/.ssh/git.pub";
};
};
};
}

1
rsc/config/git/git.pub Executable file
View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMEJg5bmZmaysJr/jgiXasjWDoxk8djsZzDJybhxiw1S 31184695+GHOSCHT@users.noreply.github.com