fix cli tools config

This commit is contained in:
Chris Kruining 2025-03-28 22:07:09 +01:00
parent 555068556f
commit 816b85e06e
Signed by: chris
SSH key fingerprint: SHA256:nG82MUfuVdRVyCKKWqhY+pCrbz9nbX6uzUns4RKa1Pg
9 changed files with 393 additions and 353 deletions

View file

@ -14,103 +14,103 @@ in
home-manager.users.${user} = {
home.packages = attrValues {
inherit (pkgs) act dura lazygit;
inherit (pkgs) git act dura lazygit;
inherit (pkgs.gitAndTools) gh git-open git-crypt;
};
programs = {
zsh.initExtra = ''
# -------===[ Helpful Git Fn's ]===------- #
gitignore() {
curl -s -o .gitignore https://gitignore.io/api/$1
}
'';
zsh.initExtra = ''
# -------===[ Helpful Git Fn's ]===------- #
gitignore() {
curl -s -o .gitignore https://gitignore.io/api/$1
}
'';
fish.functions = {
gitignore = "curl -sL https://www.gitignore.io/api/$argv";
};
fish.functions = {
gitignore = "curl -sL https://www.gitignore.io/api/$argv";
};
git = {
enable = true;
package = pkgs.gitFull;
difftastic = {
git = {
enable = true;
background = "dark";
color = "always";
display = "inline";
};
ignores = [
# General:
"*.bloop"
"*.bsp"
"*.metals"
"*.metals.sbt"
"*metals.sbt"
"*.direnv"
"*.envrc"
"*hie.yaml"
"*.mill-version"
"*.jvmopts"
# OS-related:
".DS_Store?"
".DS_Store"
".CFUserTextEncoding"
".Trash"
".Xauthority"
"thumbs.db"
"Thumbs.db"
"Icon?"
# Compiled residues:
"*.class"
"*.exe"
"*.o"
"*.pyc"
"*.elc"
];
extraConfig = {
init.defaultBranch = "main";
core = {
editor = "nvim";
whitespace = "trailing-space,space-before-tab";
};
credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
user = {
name = config.modules.${user}.user.full_name;
email = config.modules.${user}.user.email;
signingKey = "~/.ssh/id_rsa.pub";
package = pkgs.gitFull;
difftastic = {
enable = true;
background = "dark";
color = "always";
display = "inline";
};
gpg.format = "ssh";
commit.gpgSign = true;
tag.gpgSign = true;
ignores = [
# General:
"*.bloop"
"*.bsp"
"*.metals"
"*.metals.sbt"
"*metals.sbt"
"*.direnv"
"*.envrc"
"*hie.yaml"
"*.mill-version"
"*.jvmopts"
push = {
autoSetupRemote = true;
default = "current";
gpgSign = "if-asked";
autoSquash = true;
};
pull.rebase = true;
# OS-related:
".DS_Store?"
".DS_Store"
".CFUserTextEncoding"
".Trash"
".Xauthority"
"thumbs.db"
"Thumbs.db"
"Icon?"
filter = {
required = true;
smudge = "git-lfs smudge -- %f";
process = "git-lfs filter-process";
clean = "git-lfs clean -- %f";
};
# Compiled residues:
"*.class"
"*.exe"
"*.o"
"*.pyc"
"*.elc"
];
url = {
"https://github.com/".insteadOf = "gh:";
"git@github.com:".insteadOf = "ssh+gh:";
extraConfig = {
init.defaultBranch = "main";
core = {
editor = "nvim";
whitespace = "trailing-space,space-before-tab";
};
credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
user = {
name = config.modules.${user}.user.full_name;
email = config.modules.${user}.user.email;
signingKey = "~/.ssh/id_rsa.pub";
};
gpg.format = "ssh";
commit.gpgSign = true;
tag.gpgSign = true;
push = {
autoSetupRemote = true;
default = "current";
gpgSign = "if-asked";
autoSquash = true;
};
pull.rebase = true;
filter = {
required = true;
smudge = "git-lfs smudge -- %f";
process = "git-lfs filter-process";
clean = "git-lfs clean -- %f";
};
url = {
"https://github.com/".insteadOf = "gh:";
"git@github.com:".insteadOf = "ssh+gh:";
};
};
};
};
};
};
};
}