nix-configs/modules/shell/git.nix

61 lines
1.4 KiB
Nix
Raw Normal View History

{
config,
lib,
2024-02-02 11:27:11 +01:00
pkgs,
...
2024-02-02 11:27:11 +01:00
}: {
2024-02-27 20:21:51 +01:00
home-manager.users.jade = {
pkgs,
config,
...
}: {
2024-02-02 11:27:11 +01:00
programs.git = {
enable = true;
userName = "Schrottkatze";
userEmail = "git@schrottkatze.de";
aliases = {
a = "add";
c = "commit";
ca = "commit --all";
p = "push";
pl = "pull";
s = "status";
};
signing = {
2024-11-29 15:47:54 +01:00
key = "${pkgs.writeText "blue_nk3.pub" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILg7hhAKxIAbokHHcIj9HBgbkgoKGCG2R+gx7HZKL+iz cardno:000F_93C6A612"}";
2024-02-02 11:27:11 +01:00
signByDefault = true;
};
extraConfig = {
gpg = {
format = "ssh";
};
};
2024-02-02 11:27:11 +01:00
};
2024-02-27 20:21:51 +01:00
programs.jujutsu = {
enable = true;
settings = {
user = {
name = config.programs.git.userName;
email = config.programs.git.userEmail;
};
};
};
2024-02-02 11:27:11 +01:00
programs.gitui = {
enable = true;
keyConfig = ''
2024-02-28 17:06:21 +01:00
(
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: "")),
2023-11-23 15:27:53 +01:00
2024-02-28 17:06:21 +01:00
stash_open: Some(( code: Char('l'), modifiers: "")),
open_help: Some(( code: F(1), modifiers: "")),
2023-11-23 15:27:53 +01:00
2024-02-28 17:06:21 +01:00
status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),
2024-02-02 11:27:11 +01:00
)
'';
2023-11-23 15:27:53 +01:00
};
};
}