chore(git): add aliases and rework configuration

This commit is contained in:
Yorick Barbanneau 2025-02-04 17:46:43 +01:00
parent 3361cc31b1
commit 31d15e6416

View file

@ -22,9 +22,33 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.git = { programs.git = {
enable = true; enable = true;
delta = {
enable = true;
options = {
dark = true;
line-numbers = true;
syntax-theme = "base16-256";
};
};
package = pkgs.gitFull; package = pkgs.gitFull;
userName = "${cfg.userName}"; userName = "${cfg.userName}";
userEmail = "${cfg.userEmail}"; userEmail = "${cfg.userEmail}";
aliases = {
fa = "fetch --all";
far = "!git fa; git rebase";
l = "log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
lg = "log --graph --decorate --pretty=oneline --abbrev-commit";
pf = "push --force-with-lease";
rewrite = "!git commit --amend --no-edit && git push --force-with-lease";
st = "status -sb";
};
extraConfig = {
push = {
autoSetupRemote = true;
default = "current";
};
};
}; };
}; };
} }