2024-08-25 15:02:35 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
2024-08-01 22:23:39 +00:00
|
|
|
programs.git = rec {
|
2023-11-29 10:18:56 +00:00
|
|
|
enable = true;
|
2024-08-01 22:23:39 +00:00
|
|
|
package = pkgs.gitFull; # overriding takes forever to compile
|
2024-04-02 17:11:21 +00:00
|
|
|
delta.enable = true;
|
|
|
|
|
2023-11-29 10:18:56 +00:00
|
|
|
userName = "Guanran Wang";
|
|
|
|
userEmail = "guanran928@outlook.com";
|
|
|
|
signing.signByDefault = true;
|
2024-04-02 17:11:21 +00:00
|
|
|
signing.key = "91F97D9ED12639CF";
|
|
|
|
|
2024-07-03 11:14:12 +00:00
|
|
|
extraConfig = {
|
2024-07-28 15:25:47 +00:00
|
|
|
init.defaultBranch = "master";
|
2024-07-03 11:14:12 +00:00
|
|
|
pull.rebase = true;
|
|
|
|
push.autoSetupRemote = true;
|
2024-08-01 22:23:39 +00:00
|
|
|
credential.helper = "${package}/bin/git-credential-libsecret";
|
2024-07-03 11:14:12 +00:00
|
|
|
};
|
2023-11-29 10:18:56 +00:00
|
|
|
};
|
2024-02-05 08:41:20 +00:00
|
|
|
|
2024-03-20 15:01:42 +00:00
|
|
|
programs.gh.enable = true;
|
2024-03-31 02:03:52 +00:00
|
|
|
programs.gitui.enable = true;
|
2024-09-16 05:01:14 +00:00
|
|
|
|
|
|
|
# vim keybinds
|
|
|
|
# https://github.com/extrawurst/gitui/blob/master/KEY_CONFIG.md
|
|
|
|
programs.gitui.keyConfig = ''
|
|
|
|
(
|
|
|
|
move_left: Some(( code: Char('h'), modifiers: "")),
|
|
|
|
move_right: Some(( code: Char('l'), modifiers: "")),
|
|
|
|
move_up: Some(( code: Char('k'), modifiers: "")),
|
|
|
|
move_down: Some(( code: Char('j'), modifiers: "")),
|
|
|
|
|
|
|
|
stash_open: Some(( code: Char('l'), modifiers: "")),
|
|
|
|
open_help: Some(( code: F(1), modifiers: "")),
|
|
|
|
|
|
|
|
status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),
|
|
|
|
)
|
|
|
|
'';
|
2023-11-29 10:18:56 +00:00
|
|
|
}
|