Files
setup-machines/home-manager/git/default.nix
2025-02-28 19:07:15 +01:00

42 lines
862 B
Nix

{ pkgs, ... }:
{
programs.git = {
enable = true;
package = pkgs.gitFull;
delta.enable = true;
userName = "Noah Knegt";
userEmail = "personal@noahknegt.com";
signing = {
key = "~/.ssh/id_ed25519.pub";
signByDefault = true;
};
extraConfig = {
gpg = { format = "ssh"; };
push = { autoSetupRemote = true; };
pull = { rebase = true; };
fetch = { prune = true; };
};
includes = [
{
condition = "gitdir:~/git.noahknegt.com";
path = "~/.config/git/git.noahknegt.com.gitconfig";
contents = {
userEmail = "git@noahknegt.com";
};
}
{
condition = "gitdir:~/open-source";
path = "~/.config/git/open-source.gitconfig";
contents = {
userEmail = "git@noahknegt.com";
};
}
];
};
}