NixOS-Configs/home/common/git.nix
2025-11-12 20:56:26 -06:00

53 lines
1.3 KiB
Nix

{
pkgs,
config,
...
}: {
programs.lazygit = {settings = {os.editPreset = "nvim";};};
programs.diff-so-fancy = {
enable = true;
enableGitIntegration = true;
};
programs.git = {
enable = true;
settings = {
alias = {
co = "checkout";
br = "branch";
ci = "commit";
st = "status";
last = "cat-file commit HEAD";
};
core = {
user = "Don Harper";
email = "duck@duckland.org";
editor = "${pkgs.neovim}/bin/nvim";
sshCommand = "${pkgs.openssh}/bin/ssh -i ~/.ssh/git";
};
safe = {directory = "/home/don/src/nixos/duckland/.git";};
status = {
submoduleSummary = "true";
short = "true";
};
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";
};
};
};
};
}