{ 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 }; }; }; }