nixos/modules/home/git.nix

32 lines
609 B
Nix
Raw Normal View History

2023-01-21 20:08:05 +00:00
{ pkgs, lib, config, ... }:
let
cfg = config.custom.home.git;
in
2023-01-21 20:08:05 +00:00
{
options.custom.home.git = {
enable = lib.mkEnableOption "git";
};
config = lib.mkIf cfg.enable {
home-manager.users.jake.programs.git = lib.mkIf (config.custom.user == "jake") {
enable = true;
extraConfig = {
user = {
email = "jake@hillion.co.uk";
name = "Jake Hillion";
};
pull = {
rebase = true;
};
merge = {
conflictstyle = "diff3";
};
init = {
defaultBranch = "main";
};
2023-01-21 20:08:05 +00:00
};
};
};
}