nixos/roles/home/git.nix

23 lines
705 B
Nix
Raw Normal View History

{ pkgs, ... }: {
2021-06-25 12:55:23 +01:00
programs.git = {
enable = true;
userName = "Giulio De Pasquale";
2023-02-14 16:35:40 +00:00
userEmail = "git@depasquale.giugl.io";
2021-11-25 11:37:25 +00:00
extraConfig = {
filter."lfs" = {
process = "git-lfs filter-process";
required = true;
clean = "git-lfs clean -- %f";
smudge = "git-lfs smudge -- %f";
};
};
2021-11-25 11:26:29 +00:00
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 #'';
};
2021-06-25 12:55:23 +01:00
};
2021-11-25 11:37:25 +00:00
home.packages = [ pkgs.git-lfs ];
2021-06-25 12:55:23 +01:00
}