From 8bd0682511c555a2c52fbb67be71bf82626c630f Mon Sep 17 00:00:00 2001 From: Christoph Schmatzler Date: Tue, 2 Sep 2025 16:39:14 +0000 Subject: [PATCH] up Signed-off-by: Christoph Schmatzler --- modules/home/jujutsu.nix | 6 ++++++ modules/home/starship.nix | 28 ++++++++++++++++++++++++---- modules/packages.nix | 7 ++++--- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/modules/home/jujutsu.nix b/modules/home/jujutsu.nix index f816130..d4fb04c 100644 --- a/modules/home/jujutsu.nix +++ b/modules/home/jujutsu.nix @@ -1,5 +1,11 @@ { programs.jujutsu = { enable = true; + settings = { + user = { + name = "Christoph Schmatzler"; + email = "christoph@schmatzler.com"; + }; + }; }; } diff --git a/modules/home/starship.nix b/modules/home/starship.nix index d46d6d3..9de23d0 100644 --- a/modules/home/starship.nix +++ b/modules/home/starship.nix @@ -5,7 +5,7 @@ settings = { add_newline = true; command_timeout = 200; - format = "[$directory$git_branch]($style)$character"; + format = "[$directory$\{custom.jj}]($style)$character"; character = { error_symbol = "[✗ ](bold #e64553)"; success_symbol = "[❯](bold #40a02b)[❯](bold #df8e1d)[❯](bold #dc8a78)"; @@ -16,9 +16,29 @@ repo_root_style = "bold cyan"; repo_root_format = "[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) "; }; - git_branch = { - format = "[$branch]($style) "; - style = "bold"; + custom.jj = { + command = '' + jj log --revisions @ --no-graph --ignore-working-copy --color always --limit 1 --template ' + separate(" ", + change_id.shortest(4), + bookmarks, + "|", + concat( + if(conflict, "💥"), + if(divergent, "🚧"), + if(hidden, "👻"), + if(immutable, "🔒"), + ), + raw_escape_sequence("\x1b[1;32m") ++ if(empty, "(empty)"), + raw_escape_sequence("\x1b[1;32m") ++ coalesce( + truncate_end(29, description.first_line(), "…"), + "(no description set)", + ) ++ raw_escape_sequence("\x1b[0m"), + ) + ' + ''; + when = "jj --ignore-working-copy root"; + symbol = "🥋"; }; }; }; diff --git a/modules/packages.nix b/modules/packages.nix index 75d3edd..5d00aac 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -2,23 +2,24 @@ with pkgs; [ (callPackage ./bin/open-project.nix {}) age - devenv - lsof alejandra delta + devenv docker docker-compose fastfetch fd + fira-code gh git gnumake gnupg htop hyperfine - fira-code + jjui jq killall + lsof nurl openssh postgresql_17