NixOS-Configs/home/git.nix
2023-10-10 22:38:48 -05:00

51 lines
1.1 KiB
Nix

{ pkgs, config, ... }:
{
programs.git = {
enable = true;
aliases = {
co = "checkout";
br = "branch";
ci = "commit";
st = "status";
last = "cat-file commit HEAD";
};
diff-so-fancy = {
enable = true;
};
extraConfig = {
core = {
user = "Don Harper";
email = "duck@duckland.org";
editor = "${pkgs.neovim}/bin/nvim";
};
user = {
name = "Don Harper";
email = "duck@duckland.org";
};
push = {
default = "simple";
};
pull = {
rebase = "false";
};
git-extras = {
github-personal-access-token = "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";
};
fetch = {
prune = "true";
};
init = {
defaultBranch = "main";
};
credential = {
"https://github.com" = {
helper = "!${pkgs.gh}/bin/gh auth git-credential";
};
"https://gist.github.com" = {
helper = "!${pkgs.gh}/bin/gh auth git-credential";
};
};
};
};
}