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"; + } + ]; + }; + }; }