2021-11-01 20:33:21 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2021-07-29 20:21:51 +00:00
|
|
|
|
2021-11-01 20:33:21 +00:00
|
|
|
let
|
|
|
|
cfg = config.ptw.programs.git;
|
|
|
|
in {
|
|
|
|
options.ptw.programs.git = {
|
|
|
|
enable = lib.mkEnableOption "Configure git using HomeManager";
|
|
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
2021-08-04 17:07:42 +00:00
|
|
|
environment.systemPackages = [ pkgs.diff-so-fancy ];
|
2021-11-01 20:33:21 +00:00
|
|
|
home-manager.users."${config.ptw.system.singleUser}".programs.git = {
|
2021-08-04 17:07:42 +00:00
|
|
|
enable = true;
|
|
|
|
userEmail = "papatutuwawa@polynom.me";
|
|
|
|
userName = "Alexander \"PapaTutuWawa\"";
|
|
|
|
extraConfig = {
|
|
|
|
init = {
|
|
|
|
defaultBranch = "master";
|
|
|
|
};
|
2021-07-29 20:21:51 +00:00
|
|
|
|
2021-08-04 17:07:42 +00:00
|
|
|
pull = {
|
|
|
|
rebase = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
core = {
|
|
|
|
editor = "rvim";
|
|
|
|
filemode = "false";
|
|
|
|
pager = "diff-so-fancy | less --tabs=4 -RFX";
|
|
|
|
};
|
2021-07-29 20:21:51 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|