1
0
Fork 0
dotfiles/home/programs/git.nix

152 lines
2.6 KiB
Nix
Raw Normal View History

2022-08-23 21:33:04 +00:00
{ pkgs, ... }:
2021-12-30 21:33:41 +00:00
2021-12-06 22:35:29 +00:00
{
2023-01-28 19:17:25 +00:00
home.packages = with pkgs; [
git-absorb
git-crypt
];
2022-07-30 20:44:28 +00:00
2021-12-06 22:35:29 +00:00
programs.git = {
enable = true;
lfs.enable = true;
2022-04-05 20:03:38 +00:00
difftastic = {
enable = true;
};
2021-12-06 22:35:29 +00:00
userName = "Daniel Kempkens";
userEmail = "daniel+git@kempkens.io";
aliases = {
2024-04-12 20:13:16 +00:00
pushf = "push --force-with-lease --force-if-includes";
2021-12-06 22:35:29 +00:00
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";
};
apply = {
whitespace = "fix";
};
2023-11-07 11:36:04 +00:00
merge = {
conflictStyle = "zdiff3";
};
2024-04-12 20:13:16 +00:00
rebase = {
updateRefs = true;
};
2021-12-06 22:35:29 +00:00
rerere = {
enabled = true;
};
2024-04-12 20:13:16 +00:00
branch = {
sort = "-committerdate";
};
2021-12-06 22:35:29 +00:00
color = {
ui = "auto";
};
2024-04-12 20:13:16 +00:00
column = {
ui = "auto";
};
2021-12-06 22:35:29 +00:00
};
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 = [
2022-08-23 21:33:04 +00:00
# Private
2023-09-11 22:05:25 +00:00
{
2023-10-02 17:25:16 +00:00
condition = "hasconfig:remote.*.url:forgejo@git.kempkens.io:*/**";
2023-09-11 22:05:25 +00:00
contents = {
user = {
signingKey = "~/.ssh/GitHub.pub";
};
commit = {
gpgSign = true;
};
tag = {
gpgSign = true;
};
gpg = {
format = "ssh";
};
};
}
2021-12-30 21:33:41 +00:00
{
2022-08-23 21:33:04 +00:00
condition = "hasconfig:remote.*.url:git@github.com:*/**";
contents = {
user = {
signingKey = "~/.ssh/GitHub.pub";
};
commit = {
gpgSign = true;
};
tag = {
gpgSign = true;
};
gpg = {
format = "ssh";
};
};
2021-12-30 21:33:41 +00:00
}
2022-01-01 00:06:30 +00:00
2022-08-23 21:33:04 +00:00
# Work
2022-01-01 00:06:30 +00:00
{
2022-08-23 21:33:04 +00:00
condition = "hasconfig:remote.*.url:git@git.app.nedeco.de:*/**";
contents = {
user = {
email = "d.kempkens@nedeco.de";
name = "Daniel Kempkens";
signingKey = "~/.ssh/nedeco_gitlab.pub";
};
commit = {
gpgSign = true;
};
tag = {
gpgSign = true;
};
gpg = {
format = "ssh";
};
"gpg \"ssh\"" = {
allowedSignersFile = "~/.ssh/allowed_signers/work-nedeco";
};
};
2022-01-01 00:06:30 +00:00
}
2021-12-30 21:33:41 +00:00
];
2021-12-06 22:35:29 +00:00
};
2021-12-30 21:33:41 +00:00
2022-04-14 14:39:13 +00:00
home.sessionVariables.GIT_CEILING_DIRECTORIES = "/Users";
2021-12-06 22:35:29 +00:00
}