git: commit signing with ssh key

pull/1/head
Tudor Roman 2023-06-04 20:21:03 +02:00
parent fe3df485f9
commit 7c56b60cc5
Signed by: tudor
SSH Key Fingerprint: SHA256:3CwS9plgXBecpXImPGxDIaSktUXBejbV/zerZMqzzBk
2 changed files with 12 additions and 0 deletions

1
id_ed25519.pub Normal file
View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPL0/8jCHkisIGcEIztViShls0iANZwL/W6v5xwPAKkZ

View File

@ -22,8 +22,19 @@ with lib; {
log --graph --color --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%x20(%ce)%n%x20%s%n"
'';
};
extraConfig = {
user.signingkey = removeSuffix "\n" (builtins.readFile ../../../id_ed25519.pub);
gpg.format = "ssh";
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
commit.gpgsign = true;
};
};
home.file.".ssh/allowed_signers".text = ''
* ${builtins.readFile ../../../id_ed25519.pub}
'';
home.packages = with pkgs; [
git-lfs
];