1
0
Fork 0
dotfiles/programs/git.nix

74 lines
1.4 KiB
Nix
Raw Normal View History

2021-12-30 21:33:41 +00:00
{ config, ... }:
let
config-work-nedeco = "${config.xdg.configHome}/git/config-work-nedeco";
2022-01-01 00:06:30 +00:00
config-work-wdw = "${config.xdg.configHome}/git/config-work-wdw";
2021-12-30 21:33:41 +00:00
in
2021-12-06 22:35:29 +00:00
{
programs.git = {
enable = true;
lfs.enable = true;
userName = "Daniel Kempkens";
userEmail = "daniel+git@kempkens.io";
aliases = {
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
};
extraConfig = {
core = {
editor = "nvim";
whitespace = "trailing-space,space-before-tab";
autocrlf = "input";
};
pull = {
rebase = true;
};
push = {
default = "simple";
};
diff = {
2022-04-01 08:12:43 +00:00
external = "difft";
2021-12-06 22:35:29 +00:00
};
apply = {
whitespace = "fix";
};
rerere = {
enabled = true;
};
color = {
ui = "auto";
};
};
ignores = [
"*~"
"*.swp"
2022-01-10 11:28:37 +00:00
".direnv/"
2021-12-06 22:35:29 +00:00
".DS_Store"
];
2021-12-30 21:33:41 +00:00
includes = [
{
path = "${config-work-nedeco}";
condition = "gitdir:~/Code/Work/";
}
2022-01-01 00:06:30 +00:00
{
path = "${config-work-wdw}";
condition = "gitdir:~/Code/Work/WDW/";
}
2021-12-30 21:33:41 +00:00
];
2021-12-06 22:35:29 +00:00
};
2021-12-30 21:33:41 +00:00
2021-12-30 21:38:14 +00:00
home.file."${config-work-nedeco}".source = ../config/git/config-work-nedeco;
2022-01-01 00:06:30 +00:00
home.file."${config-work-wdw}".source = ../config/git/config-work-wdw;
2021-12-06 22:35:29 +00:00
}