Flake for my desktop, laptop, and my homelab.
0

Configure Feed

Select the types of activity you want to include in your feed.

more jujutsu experimentation

Adam0 (Jul 5, 2026, 11:23 PM +0200) bc2a1916 9d6412a1

+117 -61
+1 -1
flake.nix
··· 1 1 # DO-NOT-EDIT. This file was auto-generated using github:vic/flake-file. 2 2 # Use `nix run .#write-flake` to regenerate it. 3 3 { 4 - outputs = inputs: inputs.flake-parts.lib.mkFlake {inherit inputs;} (inputs.import-tree ./modules); 4 + outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules); 5 5 6 6 inputs = { 7 7 authentik-nix = {
+1 -1
modules/profiles/base.nix
··· 75 75 git 76 76 jujutsu 77 77 nur 78 - sops 79 78 shellAbbreviations 79 + sops 80 80 # keep-sorted end 81 81 82 82 # CLI
+35 -36
modules/programs/cli/starship/jujutsu.nix
··· 9 9 }: let 10 10 inherit (lib) getExe; 11 11 inherit (lib.self) starshipJjTrueColor; 12 + stylixColors = config.lib.stylix.colors.withHashtag; 13 + 14 + ansiColor = value: let 15 + color = starshipJjTrueColor value; 16 + in "${toString color.TrueColor.r};${toString color.TrueColor.g};${toString color.TrueColor.b}"; 17 + 18 + changeUniqueStyle = "1;48;2;${ansiColor stylixColors.base01};38;2;${ansiColor stylixColors.base0E}"; 19 + changeRestStyle = "1;48;2;${ansiColor stylixColors.base01};38;2;${ansiColor stylixColors.base04}"; 20 + 12 21 inherit 13 - (builtins.mapAttrs (_: starshipJjTrueColor) config.lib.stylix.colors.withHashtag) 22 + (builtins.mapAttrs (_: starshipJjTrueColor) stylixColors) 14 23 # keep-sorted start 15 24 base01 16 25 base08 17 26 base0A 18 - base0B 19 27 base0E 20 28 # keep-sorted end 21 29 ; ··· 31 39 32 40 module = [ 33 41 { 34 - type = "Symbol"; 35 - symbol = " "; 36 - color = base0E; 37 - bg_color = base01; 38 - bold = true; 39 - } 40 - 41 - { 42 42 type = "Bookmarks"; 43 43 separator = " "; 44 44 color = base0E; ··· 51 51 } 52 52 53 53 { 54 - type = "Commit"; 55 - color = base0B; 56 - bg_color = base01; 57 - bold = true; 58 - 59 - change = { 60 - color = base0B; 61 - bg_color = base01; 62 - bold = true; 63 - }; 64 - 65 - commit = { 66 - color = base0B; 67 - bg_color = base01; 68 - bold = true; 69 - }; 70 - 71 - empty_text = "(no description set)"; 72 - max_length = 24; 73 - previous_message_symbol = "⇣"; 74 - show_previous_if_empty = false; 75 - surround_with_quotes = false; 76 - } 77 - 78 - { 79 54 type = "State"; 80 55 separator = " "; 81 56 ··· 94 69 }; 95 70 96 71 empty = { 72 + disabled = true; 97 73 text = "empty"; 98 74 color = base0A; 99 75 bg_color = base01; ··· 101 77 }; 102 78 103 79 hidden = { 80 + disabled = true; 104 81 text = "hidden"; 105 82 color = base0A; 106 83 bg_color = base01; ··· 108 85 }; 109 86 110 87 immutable = { 88 + disabled = true; 111 89 text = "immutable"; 112 90 color = base0A; 113 91 bg_color = base01; ··· 145 123 } 146 124 ]; 147 125 }; 126 + 127 + starshipJjPrompt = pkgs.writeShellApplication { 128 + name = "starship-jj-prompt"; 129 + runtimeInputs = [ 130 + pkgs.jujutsu 131 + pkgs.starship-jj 132 + ]; 133 + text = '' 134 + unique="$(jj log --ignore-working-copy --no-graph -r @ -T 'change_id.shortest()' 2>/dev/null)" 135 + display="$(jj log --ignore-working-copy --no-graph -r @ -T 'change_id.shortest(8)' 2>/dev/null)" 136 + rest="''${display#"$unique"}" 137 + 138 + printf '\033[${changeUniqueStyle}m%s' "$unique" 139 + printf '\033[${changeRestStyle}m%s ' "$rest" 140 + exec starship-jj --ignore-working-copy starship prompt --starship-config ${starshipJjConfig} 141 + ''; 142 + }; 148 143 in { 149 144 programs.starship.settings = { 150 145 # keep-sorted start block=yes newline_separated=yes 151 146 custom.jj = { 152 - command = "${getExe pkgs.starship-jj} --ignore-working-copy starship prompt --starship-config ${starshipJjConfig}"; 147 + command = getExe starshipJjPrompt; 153 148 format = "[ ](#00000000)[ ](bg:base01)[$output]($style)[ ](bg:base01)"; 154 149 ignore_timeout = true; 150 + shell = [ 151 + "${getExe pkgs.fish}" 152 + "-c" 153 + ]; 155 154 style = "bg:base01 fg:base0E bold"; 156 155 use_stdin = false; 157 156 when = "${getExe pkgs.starship-jj} root --quiet";
+1
modules/programs/delta.nix
··· 13 13 programs.delta = { 14 14 enable = true; 15 15 enableGitIntegration = true; 16 + enableJujutsuIntegration = true; 16 17 17 18 options = with colors; { 18 19 true-color = "always";
+79 -23
modules/programs/tui/neovim/components/dashboard.nix
··· 9 9 }: let 10 10 inherit (lib) getExe; 11 11 inherit (lib.generators) mkLuaInline; 12 + inherit 13 + (pkgs) 14 + #keep-sorted start 15 + writeText 16 + writeShellApplication 17 + #keep-sorted end 18 + ; 12 19 13 20 colors = config.lib.stylix.colors.withHashtag; 14 21 15 - dashboardGhNotify = pkgs.writeShellApplication { 22 + dashboardStatusFilter = writeText "dashboard-status-filter.lua" '' 23 + local function truncate_ansi(line, max) 24 + local out = {} 25 + local visible = 0 26 + local i = 1 27 + 28 + while i <= #line do 29 + local char = line:sub(i, i) 30 + 31 + if char == "\27" then 32 + local finish = line:find("m", i, true) 33 + if not finish then 34 + break 35 + end 36 + 37 + out[#out + 1] = line:sub(i, finish) 38 + i = finish + 1 39 + else 40 + if visible >= max then 41 + out[#out + 1] = "...\27[0m" 42 + break 43 + end 44 + 45 + out[#out + 1] = char 46 + visible = visible + 1 47 + i = i + 1 48 + end 49 + end 50 + 51 + return table.concat(out) 52 + end 53 + 54 + local seen = 0 55 + for line in io.lines() do 56 + if seen == 6 then 57 + break 58 + end 59 + 60 + local plain = line:gsub("\27%[[0-9;]*m", "") 61 + print(#plain > 48 and truncate_ansi(line, 45) or line) 62 + seen = seen + 1 63 + end 64 + 65 + if seen == 0 then 66 + print("No jj changes") 67 + end 68 + ''; 69 + 70 + dashboardGhNotify = writeShellApplication { 16 71 name = "dashboard-gh-notify"; 17 72 runtimeInputs = [pkgs.coreutils]; 18 73 text = '' 19 74 GH_TOKEN="$(cat "${config.sops.secrets.github_token.path}")" 20 75 export GH_TOKEN 21 76 exec "${getExe pkgs.gh-notify}" "$@" 77 + ''; 78 + }; 79 + 80 + dashboardVcsStatus = writeShellApplication { 81 + name = "dashboard-vcs-status"; 82 + runtimeInputs = with pkgs; [ 83 + # keep-sorted start 84 + gawk 85 + git 86 + jujutsu 87 + lua 88 + # keep-sorted end 89 + ]; 90 + text = '' 91 + if jj root >/dev/null 2>&1; then 92 + jj --color always status | lua ${dashboardStatusFilter} 93 + elif git rev-parse --is-inside-work-tree >/dev/null 2>&1; then 94 + git -c color.status=always status --short --branch --renames \ 95 + | awk 'NR <= 6 { print; seen = 1 } END { if (!seen) print "No git changes" }' 96 + else 97 + printf '\n\n\n\n\n\n' 98 + fi 22 99 ''; 23 100 }; 24 101 in { ··· 319 396 icon = ""; 320 397 title = "VCS Status"; 321 398 section = "terminal"; 322 - cmd = getExe (pkgs.writeShellApplication { 323 - name = "dashboard-vcs-status"; 324 - runtimeInputs = with pkgs; [ 325 - # keep-sorted start 326 - gawk 327 - git 328 - jujutsu 329 - # keep-sorted end 330 - ]; 331 - text = '' 332 - if jj root >/dev/null 2>&1; then 333 - jj --color always status \ 334 - | awk 'NR <= 6 { print; seen = 1 } END { if (!seen) print "No jj changes" }' 335 - elif git rev-parse --is-inside-work-tree >/dev/null 2>&1; then 336 - git -c color.status=always status --short --branch --renames \ 337 - | awk 'NR <= 6 { print; seen = 1 } END { if (!seen) print "No git changes" }' 338 - else 339 - printf '\n\n\n\n\n\n' 340 - fi 341 - ''; 342 - }); 399 + cmd = getExe dashboardVcsStatus; 343 400 height = 6; 344 401 padding = 1; 345 402 indent = 3; ··· 354 411 } 355 412 ]; 356 413 }; 357 - 358 414 }; 359 415 # keep-sorted end 360 416 };