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

33 lines
764 B
Nix

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