nixpkgs/home/programs/git.nix

148 lines
2.5 KiB
Nix
Raw Normal View History

{ pkgs }:
{
enable = true;
userName = "Daniel Siepmann";
userEmail = "coding@daniel-siepmann.de";
signing = {
key = "15560EF4";
signByDefault = true;
};
aliases = {
c = "checkout";
2024-02-15 07:23:55 +01:00
f = "fetch";
s = "status -s";
2024-02-15 07:23:55 +01:00
ss = "show -s";
dc = "diff --cached";
2024-02-15 07:23:55 +01:00
rh = "reset --hard";
sc = "switch -c";
st = "switch -t";
com = "commit";
lg = "log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative";
};
ignores = [
# Some files which might be generated by system or tools
"*~"
"*.swp"
"*.swn"
"*.swo"
"*.orig"
"*.rej"
"*.pyc"
"*.bak"
"*/tags"
"/tags"
"*.~lock.*#"
".phpactor.json"
".ignore"
# As I'm using nix-shell in many projects for my own confidence
"shell.nix"
# Some generics which occur in some projects
"build/"
"logs/"
# PHP Specific
".phpunit.result.cache"
2023-02-07 08:57:26 +01:00
".phpunit.cache"
2023-02-16 15:38:32 +01:00
".php-cs-fixer.cache"
"codeception.yml"
"codeception.yml_"
"phpcs.xml"
# TYPO3 documentation specific
"Documentation-GENERATED-temp*/"
2022-10-05 16:53:54 +02:00
# Customer specific
"config/env/development-dsiepmann/"
];
diff-so-fancy = {
enable = true;
2023-01-03 15:23:43 +01:00
markEmptyLines = false;
stripLeadingSymbols = false;
useUnicodeRuler = false;
};
extraConfig = {
advice = {
detachedHead = false;
};
branch = {
autosetuprebase = "always";
};
fetch = {
prune = true;
};
color = {
diff = "auto";
status = "auto";
branch = "auto";
interactive = "auto";
ui = "auto";
};
core = {
whitespace = "-blank-at-eol,-space-before-tab,-indent-with-non-tab,-tab-in-indent,-blank-at-eof,-trailing-space-,cr-at-eol";
};
diff = {
# Not possible right now, due to: https://github.com/gitonomy/gitlib/issues/114 for own customer project
# noprefix = true;
algorithm = "histogram";
};
pager = {
branch = false;
show = false;
};
grep = {
lineNumber = true;
};
help = {
autocorrect = 1;
};
2023-04-08 20:01:43 +02:00
init = {
defaultBranch = "main";
};
push = {
default = "current";
gpgSign = "if-asked";
autoSetupRemote = true;
};
2023-04-08 20:01:43 +02:00
pull = {
rebase = true;
};
rebase = {
autoStash = true;
autosquash = true;
};
merge = {
ff = true;
conflictstyle = "zdiff3";
tool = "nvim";
};
"mergetool \"nvim\"" = {
cmd = "nvim $MERGED";
};
};
}