nixos-config/home/git.nix
Antoine Martin b0821dd3f3 home: git: disable maintenance prefetch task
I don't want to get prompted for SSH credentials at random moments, and
I don't think I need prefetch on any repositories (to be fair I don't
think I need automated scheduled maintenance on any of my repositories,
but hey, the option's there).
2024-02-19 13:08:05 +01:00

69 lines
1.5 KiB
Nix

{
config,
lib,
pkgs,
...
}: let
inherit
(lib)
mkEnableOption
mkIf
;
cfg = config.my.home.git;
in {
options.my.home.git.enable = (mkEnableOption "Git configuration") // {default = true;};
config = mkIf cfg.enable {
programs.git = {
enable = true;
delta = {
enable = true;
options = {
syntax-theme = "Solarized (light)";
};
};
lfs.enable = true;
userEmail = "antoine@alarsyo.net";
userName = "Antoine Martin";
extraConfig = {
commit = {verbose = true;};
core = {editor = "vim";};
init = {defaultBranch = "main";};
pull = {rebase = true;};
rerere = {enabled = true;};
maintenance.prefetch.enabled = false;
};
aliases = {
push-wip = "push -o ci.skip";
push-merge = "push -o merge_request.create -o merge_request.merge_when_pipeline_succeeds -o merge_request.remove_source_branch";
push-mr = "push -o merge_request.create -o merge_request.remove_source_branch";
};
includes = [
{
condition = "gitdir:~/work/lrde/";
contents = {user = {email = "amartin@lrde.epita.fr";};};
}
{
condition = "gitdir:~/work/prologin/";
contents = {user = {email = "antoine.martin@prologin.org";};};
}
{
condition = "gitdir:~/work/epita/";
contents = {user = {email = "antoine4.martin@epita.fr";};};
}
];
ignores = [
"/.direnv/"
"/.envrc"
];
};
};
}