mirror of
https://github.com/softinio/nix-config.git
synced 2025-09-03 08:06:41 -07:00
Code cleanup to make modular part1
This commit is contained in:
parent
9d593e70b7
commit
0e58ff36eb
11 changed files with 435 additions and 418 deletions
52
programs/git/default.nix
Normal file
52
programs/git/default.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
gitConfig = {
|
||||
core = {
|
||||
editor = "nvim";
|
||||
pager = "diff-so-fancy | less --tabs=4 -RFX";
|
||||
};
|
||||
merge.tool = "intellij";
|
||||
mergetool = {
|
||||
cmd = "idea merge \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"";
|
||||
trustExitCode = true;
|
||||
prompt = false;
|
||||
};
|
||||
diff.tool = "intellij";
|
||||
difftool = {
|
||||
cmd = "idea diff \"$LOCAL\" \"$REMOTE\"";
|
||||
prompt = false;
|
||||
};
|
||||
url = {
|
||||
"git@github.com:" = {
|
||||
insteadOf = "https://github.com/";
|
||||
};
|
||||
};
|
||||
pull = {
|
||||
rebase = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userEmail = "code@softinio.com";
|
||||
userName = "Salar Rahmanian";
|
||||
ignores = [
|
||||
"*~"
|
||||
".DS_Store"
|
||||
"*.bloop"
|
||||
"*.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"
|
||||
];
|
||||
extraConfig = gitConfig;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue