style(defaults/git): avoid using lib.mkMerge
This makes the code easier to understand, and might fix a problem I noticed a while ago.
This commit is contained in:
parent
ae7430884d
commit
f3c3add058
1 changed files with 15 additions and 17 deletions
|
|
@ -25,24 +25,22 @@ in
|
|||
programs.git = {
|
||||
enable = lib.mkIf config.nixowos.allowAddingPackages (lib.mkDefault true);
|
||||
|
||||
config = lib.mkMerge [
|
||||
{
|
||||
init.defaultBranch = "main";
|
||||
core.compression = 9; # max
|
||||
credential.helper = "cache";
|
||||
config = {
|
||||
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 (superCfg.delta.enable && config.nixowos.allowAddingPackages) {
|
||||
core.pager = "${lib.getExe pkgs.delta}";
|
||||
interactive.diffFilter = "${lib.getExe pkgs.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
|
||||
})
|
||||
];
|
||||
push.autoSetupRemote = true;
|
||||
pull.ff = "only";
|
||||
merge.conflictStyle = "zdiff3";
|
||||
commit.verbose = true; # show diffs in commit editor
|
||||
}
|
||||
// (lib.optionalAttrs (superCfg.delta.enable && config.nixowos.allowAddingPackages) {
|
||||
core.pager = "${lib.getExe pkgs.delta}";
|
||||
interactive.diffFilter = "${lib.getExe pkgs.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
|
||||
});
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue