nix-config/modules/shell/git.nix

29 lines
655 B
Nix
Raw Normal View History

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