nixos-config/modules/programs/git/default.nix

33 lines
764 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
2021-07-29 20:21:51 +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 ];
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
};
};
};
}