refactor(home.git): make userEmail configurable and reorganize settings

This commit is contained in:
Giulio De Pasquale 2025-06-17 12:45:31 +01:00
parent c466fdad7b
commit 04ee412d1e

View File

@ -1,8 +1,11 @@
{ pkgs, ... }: {
{ gitEmail ? "git@depasquale.giugl.io" }: { pkgs, ... }: {
programs.git = {
enable = true;
userName = "Giulio De Pasquale";
userEmail = "git@depasquale.giugl.io";
userEmail = gitEmail;
delta.enable = true;
lfs.enable = true;
extraConfig = {
filter."lfs" = {
process = "git-lfs filter-process";
@ -11,12 +14,12 @@
smudge = "git-lfs smudge -- %f";
};
};
delta.enable = true;
lfs.enable = true;
aliases = {
ai = ''! cd -- "''${GIT_PREFIX:-.}" && git diff HEAD -- "$@" | aichat -m ollama:pino-coder -r commitmessage #'';
ais = ''! cd -- "''${GIT_PREFIX:-.}" && git diff --staged HEAD -- "$@" | aichat -m ollama:pino-coder -r commitmessage #'';
ai = ''! cd -- "''${GIT_PREFIX:-.}" && git diff HEAD -- "$@" | aichat -m ollama:pino-coder -c -r commitmessage #'';
ais = ''! cd -- "''${GIT_PREFIX:-.}" && git diff --staged HEAD -- "$@" | aichat -m ollama:pino-coder -c -r commitmessage #'';
};
};
home.packages = [ pkgs.git-lfs ];
}