Files
nix-config/home/programs/git.nix
2024-11-07 17:24:17 +01:00

32 lines
812 B
Nix

{ pkgs, config, ... }: {
programs.git = {
enable = true;
userName = "Michał Czyż";
userEmail = "mike@c2yz.com";
extraConfig = {
init.defaultBranch = "main";
push.autoSetupRemote = true;
user.signingkey = "9745B9E27E2B1ABB";
commit.gpgsign = true;
push.enabled = true;
column.ui = "auto";
branch.sort = "-committerdate";
pull.rebase = "false";
rerere.enabled = true;
# gpg = {
# format = "ssh";
# ssh.defaultKeyCommand = pkgs.writeShellScript "git_key" ''
# if ssh-add -L | grep -vq '${config.local.keys.senpai}'; then
# ssh-add -t 1m ~/.ssh/id_ed25519
# fi
# echo 'key::${config.local.keys.senpai}'
# '';
# };
push.gpgsign = "if-asked";
};
};
}