mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-10 07:59:40 +00:00
56 lines
1.3 KiB
Nix
56 lines
1.3 KiB
Nix
|
{ osConfig, pkgs, ... }:
|
||
|
let
|
||
|
myGitConf = osConfig.myOptions.home-manager.git;
|
||
|
in
|
||
|
{
|
||
|
imports = [
|
||
|
./gh.nix
|
||
|
./ignores.nix
|
||
|
./aliases.nix
|
||
|
];
|
||
|
|
||
|
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
|
||
|
];
|
||
|
}
|