nix/git/default.nix

45 lines
946 B
Nix
Raw Normal View History

2022-11-25 16:30:22 +00:00
{ config, pkgs, ... }:
{
programs.git = {
enable = true;
userName = "Evan Reichard";
2024-02-17 16:05:12 +00:00
aliases = {
lg = "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all -n 15";
};
2024-01-02 15:51:04 +00:00
includes = [
{
path = "~/.config/git/work";
condition = "gitdir:~/Development/git/work/";
}
{
path = "~/.config/git/personal";
condition = "gitdir:~/Development/git/personal/";
}
];
2024-02-17 16:05:12 +00:00
extraConfig = {
core = {
autocrlf = "input";
safecrlf = "true";
};
merge = {
conflictstyle = "zdiff3";
};
2024-03-05 22:55:34 +00:00
push = {
autoSetupRemote = true;
};
2024-02-17 16:05:12 +00:00
};
2024-01-02 15:51:04 +00:00
};
xdg.configFile = {
# Copy Configuration
git = {
source = ./config;
recursive = true;
};
2022-11-25 16:30:22 +00:00
};
}