nixos/modules/home/git/default.nix

41 lines
861 B
Nix
Raw Normal View History

{
lib,
config,
...
}: let
cfg = config.myConfig.git;
in {
imports = [./lazygit.nix];
options.myConfig.git = {
enable = lib.mkEnableOption "git";
};
config = lib.mkIf cfg.enable {
myConfig.git.lazygit.enable = lib.mkDefault true;
programs.git = {
enable = true;
extraConfig = {
fetch.parallel = 0;
init.defaultBranch = "main";
pull.rebase = true;
};
delta = {
enable = true;
options = {
decorations = {
commit-decoration-style = "bold yellow box ul";
file-decoration-style = "none";
file-style = "bold yellow ul";
};
features = "decorations";
whitespace-error-style = "22 reverse";
};
};
userEmail = "max.kaenner@gmail.com";
userName = "Max Känner";
};
};
}