mirror of
https://github.com/ItsDrike/nixdots
synced 2025-06-30 10:20:43 +00:00
Add git configuration
This commit is contained in:
parent
a9cdf25a57
commit
329f48882e
9 changed files with 223 additions and 0 deletions
58
home/programs/terminal/tools/git/default.nix
Normal file
58
home/programs/terminal/tools/git/default.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ osConfig, pkgs, ... }:
|
||||
let
|
||||
myGitConf = osConfig.myOptions.home-manager.git;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./gh.nix
|
||||
./ignores.nix
|
||||
./aliases.nix
|
||||
];
|
||||
|
||||
# TODO: Figure out how to manage gpg keys properly in nix/home-manager
|
||||
# (right now, I'm importing my keys manually)
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
|
||||
userName = "ItsDrike";
|
||||
userEmail = "itsdrike@protonmail.com";
|
||||
|
||||
signing = {
|
||||
signByDefault = myGitConf.signing.enabled;
|
||||
key = myGitConf.signing.key;
|
||||
};
|
||||
|
||||
delta.enable = true;
|
||||
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
merge.conflictstyle = "diff3";
|
||||
delta.line-numbers = true;
|
||||
|
||||
push = {
|
||||
default = "current";
|
||||
followTags = true;
|
||||
};
|
||||
|
||||
url = {
|
||||
"https://github.com/".insteadOf = "github:";
|
||||
"ssh://git@github.com/".pushInsteadOf = "github:";
|
||||
"https://gitlab.com/".insteadOf = "gitlab:";
|
||||
"ssh://git@gitlab.com/".pushInsteadOf = "gitlab:";
|
||||
"https://aur.archlinux.org/".insteadOf = "aur:";
|
||||
"ssh://aur@aur.archlinux.org/".pushInsteadOf = "aur:";
|
||||
"https://git.sr.ht/".insteadOf = "srht:";
|
||||
"ssh://git@git.sr.ht/".pushInsteadOf = "srht:";
|
||||
"https://codeberg.org/".insteadOf = "codeberg:";
|
||||
"ssh://git@codeberg.org/".pushInsteadOf = "codeberg:";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gist # Manage github gists
|
||||
act # Run github actions locally
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue