1
0
Fork 0
forked from UniverseBow/flake
flake-ooni/homes/lorkan/modules/cli/git.nix
2026-03-25 22:55:15 -07:00

106 lines
2.1 KiB
Nix
Executable file

{pkgs, ...}: {
home.packages = with pkgs; [
delta # git diff viewer
];
programs = {
git = {
enable = true;
lfs.enable = true;
# signing = {
# key = "YOUR-GPG-KEY-HERE";
# format = "openpgp";
# signByDefault = true;
# };
settings = {
user.name = "UniverseBow";
user.email = "lorkandavidson@gmail.com";
alias = {
s = "status";
d = "diff";
l = "log";
c = "commit";
p = "push";
};
color.ui = true;
core.editor = "vim";
# delta diff viewer
core.pager = "delta";
interactive.diffFilter = "delta --color-only";
delta = {
navigate = true;
line-numbers = true;
side-by-side = true;
};
merge.conflictStyle = "zdiff3";
init = {
defaultBranch = "main";
};
url = {
"git@github.com:" = {
insteadOf = [
"gh:"
"github:"
];
};
"https://gitlab.com/" = {
insteadOf = [
"gl:"
"gitlab:"
];
};
"git@codeberg.org:" = {
insteadOf = [
"cb:"
"codeberg:"
];
};
"git@tearforge.net/" = {
insteadOf = [
"cry:"
"forge:"
];
};
};
};
};
lazygit = {
enable = true;
enableFishIntegration = true;
enableZshIntegration = true;
shellWrapperName = "lg";
settings = {
gui = {
useHunkModeInStagingView = false;
skipDiscardChangeWarning = false;
skipStashWarning = true;
animateExplosion = true; # FUCK YEAH
theme = {
lightTheme = false;
activeBorderColor = ["green" "bold"];
inactiveBorderColor = ["white"];
selectedLineBgColor = ["default"];
};
};
git.pagers = [
{
pager = "delta --dark --pager=never";
}
];
};
};
};
}