2021-04-11 23:31:11 -07:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
gitConfig = {
|
|
|
|
core = {
|
|
|
|
editor = "nvim";
|
|
|
|
pager = "diff-so-fancy | less --tabs=4 -RFX";
|
|
|
|
};
|
2021-09-02 22:13:27 -07:00
|
|
|
init.defaultBranch = "main";
|
2022-09-21 20:13:17 -07:00
|
|
|
merge.conflictstyle = "diff3";
|
|
|
|
merge.tool = "nvim";
|
|
|
|
mergetool.nvim = {
|
|
|
|
cmd = "nvim -d -c \"wincmd l\" -c \"norm ]c\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"";
|
2021-04-11 23:31:11 -07:00
|
|
|
prompt = false;
|
2022-09-21 20:13:17 -07:00
|
|
|
keepBackup = false;
|
2021-04-11 23:31:11 -07:00
|
|
|
};
|
2022-09-21 20:13:17 -07:00
|
|
|
diff.tool = "nvim";
|
|
|
|
difftool.nvim = {
|
|
|
|
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\"";
|
2021-04-11 23:31:11 -07:00
|
|
|
prompt = false;
|
|
|
|
};
|
|
|
|
url = {
|
|
|
|
"git@github.com:" = {
|
|
|
|
insteadOf = "https://github.com/";
|
|
|
|
};
|
|
|
|
};
|
2022-08-07 22:50:23 -07:00
|
|
|
fetch.prune = true;
|
2021-04-11 23:31:11 -07:00
|
|
|
pull = {
|
|
|
|
rebase = true;
|
|
|
|
};
|
|
|
|
};
|
2022-08-07 22:50:23 -07:00
|
|
|
myAliases = {
|
|
|
|
ci = "commit";
|
|
|
|
co = "checkout";
|
|
|
|
main = "checkout main";
|
|
|
|
master = "checkout master";
|
|
|
|
};
|
|
|
|
myIgnores = [
|
2021-04-11 23:31:11 -07:00
|
|
|
"*~"
|
|
|
|
".DS_Store"
|
|
|
|
"*.bloop"
|
2022-08-07 22:50:23 -07:00
|
|
|
".direnv/"
|
|
|
|
".idea/"
|
|
|
|
".mypy_cache"
|
2021-04-11 23:31:11 -07:00
|
|
|
"*.metals"
|
|
|
|
"*.metals.sbt"
|
|
|
|
"*metals.sbt"
|
|
|
|
"*.direnv"
|
|
|
|
"*.envrc" # there is lorri, nix-direnv & simple direnv; let people decide
|
|
|
|
"*hie.yaml" # ghcide files
|
|
|
|
"*.mill-version" # used by metals
|
|
|
|
"*.idea"
|
|
|
|
"*.vscode"
|
|
|
|
"*.python-version"
|
2022-08-07 22:50:23 -07:00
|
|
|
"result"
|
2021-04-11 23:31:11 -07:00
|
|
|
];
|
2022-08-07 22:50:23 -07:00
|
|
|
in
|
|
|
|
{
|
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
userEmail = "code@softinio.com";
|
|
|
|
userName = "Salar Rahmanian";
|
|
|
|
aliases = myAliases;
|
|
|
|
ignores = myIgnores;
|
2021-04-11 23:31:11 -07:00
|
|
|
extraConfig = gitConfig;
|
|
|
|
};
|
|
|
|
}
|