diff --git a/modules/git.nix b/modules/git.nix index 94629ab..6dd8c27 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -186,51 +186,4 @@ 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"; - } - ]; - }; - }; } diff --git a/modules/jj.nix b/modules/jj.nix new file mode 100644 index 0000000..30bdb1a --- /dev/null +++ b/modules/jj.nix @@ -0,0 +1,52 @@ +{ pkgs, ... }: { + 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"; + } + ]; + }; + }; + + home.packages = [ + pkgs.jjui + ]; +} diff --git a/users/hauleth.nix b/users/hauleth.nix index 6551418..f634b59 100644 --- a/users/hauleth.nix +++ b/users/hauleth.nix @@ -12,6 +12,7 @@ ../modules/pijul.nix ../modules/nvim.nix ../modules/ghostty.nix + ../modules/jj.nix ./modules/dircolors.nix {home.stateVersion = "24.11";} ];