From 6d5db5c3e0d43fc6cacef9c96fa5c0b20dfc37f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Niemier?= <~@hauleth.dev> Date: Fri, 23 May 2025 20:58:22 +0200 Subject: [PATCH] ft: add Jujutsu --- modules/git.nix | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/modules/git.nix b/modules/git.nix index 6dd8c27..94629ab 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -186,4 +186,51 @@ branchless."revsets.alias".work = "heads(draft())"; }; }; + + programs.jujutsu = { + enable = true; + + settings = { + user.email = "~@hauleth.dev"; + user.name = "Ɓukasz Niemier"; + + aliases = { + lg = ["log"]; + }; + + git.write-change-id-header = true; + + signing = { + behaviour = "own"; + backend = "ssh"; + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN7q0wm7C+EX0ORpRxeyhvWTT2BMPjSRQIZmbzPLIiHC"; + + backends.ssh = { + program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"; + + allowed-signers = "~/.ssh/allowed_signers"; + }; + }; + + templates.draft_commit_description ='' + concat( + coalesce(description, default_commit_description, "\n"), + surround( + "\nJJ: This commit contains the following changes:\n", "", + indent("JJ: ", diff.stat(72)), + ), + "\nJJ: ignore-rest\n", + diff.git(), + ) + ''; + + "--scope" = [ + { + "--when".repositories = ["~/Workspace/supabase/"]; + + user.email = "lukasz@supabase.io"; + } + ]; + }; + }; } -- 2.51.2