nixcfg/modules/home/cli-apps/git/default.nix
Harald Hoyer a995d9b07f fix: switch off line numbers for git diff
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
2024-01-12 14:25:52 +01:00

50 lines
1.1 KiB
Nix

{ lib
, config
, pkgs
, ...
}:
with lib;
with lib.plusultra; let
cfg = config.plusultra.cli-apps.git;
in
{
options.plusultra.cli-apps.git = {
enable = mkEnableOption "git";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
delta
gh
];
programs.git = {
enable = true;
userName = "Harald Hoyer";
userEmail = "harald@hoyer.xyz";
extraConfig = {
init.defaultBranch = "main";
"credential \"https://github.com\"" = {
helper = "!gh auth git-credential";
};
alias = {
co = "checkout";
ci = "commit";
};
pull.ff = "only";
core.pager = "delta";
delta = {
features = "side-by-side line-numbers decorations";
syntax-theme = "DarkNeon";
light = "false";
line-numbers = "false";
navigate = "true";
};
interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
merge.conflictStyle = "diff3";
diff.colorMoved = "default";
};
};
};
}