Files
nixos-config/home-manager/commands/git.nix
2025-08-20 00:18:31 -07:00

40 lines
905 B
Nix

{
hostname,
lib,
...
}:
{
programs = {
git = {
enable = true;
userName = "rogueking";
userEmail = "miguel@muniz.org";
lfs.enable = true;
} // lib.optionalAttrs (! (lib.elem hostname [ "buildbox" ])) {
signing = {
signByDefault = true;
signer = if hostname == "eva-02"
then
"/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
else
"/opt/1Password/op-ssh-sign";
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHI7zcxrwwg4VqpGduhPX31aslzXwkRXiM32+8K+aIMu";
};
extraConfig = {
gpg = {
format = "ssh";
ssh = {
program = if hostname == "eva-02"
then
"/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
else
"/usr/bin/op-ssh-sign";
};
};
};
};
};
}