This commit is contained in:
Geoffrey Frogeye 2024-09-15 00:33:54 +02:00
parent ae61f0c6d4
commit a43209a902
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -1,6 +1,9 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
let
cfg = config.programs.git;
in
{ {
config = lib.mkIf config.programs.git.enable { config = lib.mkIf cfg.enable {
home.packages = [ home.packages = [
(pkgs.writeShellApplication { (pkgs.writeShellApplication {
name = "git-sync"; name = "git-sync";
@ -26,7 +29,8 @@
); );
}) })
]; ];
programs.git = { programs = {
git = {
package = pkgs.gitFull; package = pkgs.gitFull;
aliases = { aliases = {
"git" = "!exec git"; # In case I write one too many git "git" = "!exec git"; # In case I write one too many git
@ -67,6 +71,29 @@
# This escapes quotes, which isn't the case in the original, hoping this isn't an issue. # This escapes quotes, which isn't the case in the original, hoping this isn't an issue.
}; };
}; };
jujutsu = {
enable = true;
settings = {
git.auto-local-bookmark = true;
user = {
email = cfg.userEmail;
name = cfg.userName;
};
ui = {
pager = "delta";
diff.format = "git";
diff-editor = "meld-3";
merge-editor = "meld";
};
signing = {
sign-all = true;
backend = "gpg";
inherit (cfg.signing) key;
backends.gpg.allow-expired-keys = false;
};
};
};
};
services = { services = {
git-sync = { git-sync = {
enable = false; # The real thing syncs too quickly and asks for passphrase, which is annoying enable = false; # The real thing syncs too quickly and asks for passphrase, which is annoying