diff3 adds a lot of lines to do the conflict, which can make it harder to understand in full sometimes. especially when the lsp is just filling it with errors
38 lines
718 B
Nix
38 lines
718 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
|
|
let
|
|
name = "git";
|
|
cfg = config.nixowos.defaults.${name};
|
|
in
|
|
{
|
|
options = {
|
|
nixowos.defaults.${name}.enable = lib.mkEnableOption name;
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
programs.git = {
|
|
enable = lib.mkIf config.nixowos.allowAddingPackages (lib.mkDefault true);
|
|
|
|
config = {
|
|
init.defaultBranch = "main";
|
|
core.compression = 9; # max
|
|
|
|
# otherwise git suggests changing the config
|
|
# which two people I know have done without understanding
|
|
# causing further problems
|
|
pull.ff = "only";
|
|
|
|
push.autoSetupRemote = true;
|
|
|
|
commit.verbose = true; # show diffs in commit editor
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|