nix-configs/modules/shell/git.nix
2024-03-05 13:53:39 +01:00

61 lines
1.4 KiB
Nix

{
config,
lib,
pkgs,
...
}: {
home-manager.users.jade = {
pkgs,
config,
...
}: {
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 = {
key = "${pkgs.writeText "red_nk3.pub" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOaE8TFsIazpn4OnHvHcRpOFr9FfvMaWOiEjmHsmnAoE cardno:000F_70CD7D05"}";
signByDefault = true;
};
extraConfig = {
gpg = {
format = "ssh";
};
};
};
programs.jujutsu = {
enable = true;
settings = {
user = {
name = config.programs.git.userName;
email = config.programs.git.userEmail;
};
};
};
programs.gitui = {
enable = true;
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")),
)
'';
};
};
}