treewide: move defaults to dedicated folder

This commit is contained in:
Elec3137 2026-03-23 20:41:34 -07:00
commit 00c06f982b
6 changed files with 0 additions and 0 deletions

View file

@ -1,47 +0,0 @@
{
pkgs,
lib,
config,
...
}:
let
name = "git";
cfg = config.nixowos.cli.${name};
in
{
options.nixowos.cli.${name} = {
enable = lib.mkEnableOption name;
delta.enable = lib.mkEnableOption "delta within git" // {
default = true;
};
};
config = lib.mkIf cfg.enable {
programs.git = {
enable = true;
config = lib.mkMerge [
{
init.defaultBranch = "main";
core.compression = 9; # max
credential.helper = "cache";
push.autoSetupRemote = true;
pull.ff = "only";
merge.conflictStyle = "zdiff3";
commit.verbose = true; # show diffs in commit editor
}
(lib.mkIf cfg.delta.enable {
core.pager = "${pkgs.delta}/bin/delta";
interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
delta.navigate = true; # use n and N to move between diff sections
delta.diff-highlight = true; # simpler mode, highlights inter-line changes
})
];
};
};
}