Compare commits

...

3 Commits

Author SHA1 Message Date
d84646800c refactor 2026-01-20 17:41:15 +00:00
73f8184b05 jj-starship 2026-01-20 17:41:15 +00:00
183f0b9fd3 as mcp 2026-01-20 17:41:15 +00:00
12 changed files with 189 additions and 82 deletions

99
flake.lock generated
View File

@@ -6,7 +6,7 @@
"llm-agents",
"nixpkgs"
],
"systems": "systems"
"systems": "systems_2"
},
"locked": {
"lastModified": 1767386128,
@@ -213,7 +213,7 @@
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
@@ -231,7 +231,25 @@
},
"flake-utils_3": {
"inputs": {
"systems": "systems_4"
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_5"
},
"locked": {
"lastModified": 1731533236,
@@ -315,10 +333,29 @@
"type": "github"
}
},
"jj-starship": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1768065230,
"narHash": "sha256-FCkDSxGJAge86r5xMzr2lV0pjslS8ZQ7vBNId0VDDi0=",
"owner": "dmmulroy",
"repo": "jj-starship",
"rev": "0fe6d62a83b6964f33cff2658b39a7563e42dd09",
"type": "github"
},
"original": {
"owner": "dmmulroy",
"repo": "jj-starship",
"type": "github"
}
},
"llm-agents": {
"inputs": {
"blueprint": "blueprint",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"treefmt-nix": "treefmt-nix"
},
"locked": {
@@ -338,7 +375,7 @@
"lumen": {
"inputs": {
"fenix": "fenix",
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
]
@@ -398,11 +435,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1768569498,
"narHash": "sha256-bB6Nt99Cj8Nu5nIUq0GLmpiErIT5KFshMQJGMZwgqUo=",
"lastModified": 1766840161,
"narHash": "sha256-Ss/LHpJJsng8vz1Pe33RSGIWUOcqM1fjrehjUkdrWio=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "be5afa0fcb31f0a96bf9ecba05a516c66fcd8114",
"rev": "3edc4a30ed3903fdf6f90c837f961fa6b49582d1",
"type": "github"
},
"original": {
@@ -428,6 +465,22 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1768569498,
"narHash": "sha256-bB6Nt99Cj8Nu5nIUq0GLmpiErIT5KFshMQJGMZwgqUo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "be5afa0fcb31f0a96bf9ecba05a516c66fcd8114",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1768896952,
"narHash": "sha256-cglpDO7t38CYHH76LCchDAOjZC08Cy+k+aM7S4C1NDM=",
@@ -443,7 +496,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1767026758,
"narHash": "sha256-7fsac/f7nh/VaKJ/qm3I338+wAJa/3J57cOGpXi0Sbg=",
@@ -459,7 +512,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_5": {
"locked": {
"lastModified": 1765934234,
"narHash": "sha256-pJjWUzNnjbIAMIc5gRFUuKCDQ9S1cuh3b2hKgA7Mc4A=",
@@ -478,8 +531,8 @@
"nixvim": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_3",
"systems": "systems_3"
"nixpkgs": "nixpkgs_4",
"systems": "systems_4"
},
"locked": {
"lastModified": 1768795384,
@@ -505,10 +558,11 @@
"homebrew-cask": "homebrew-cask",
"homebrew-core": "homebrew-core",
"jj-ryu": "jj-ryu",
"jj-starship": "jj-starship",
"llm-agents": "llm-agents",
"lumen": "lumen",
"nix-homebrew": "nix-homebrew",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"nixvim": "nixvim",
"sops-nix": "sops-nix",
"zjstatus": "zjstatus"
@@ -648,6 +702,21 @@
"type": "github"
}
},
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
@@ -672,8 +741,8 @@
"zjstatus": {
"inputs": {
"crane": "crane",
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_4",
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_5",
"rust-overlay": "rust-overlay"
},
"locked": {

View File

@@ -44,6 +44,7 @@
url = "github:dmmulroy/jj-ryu";
flake = false;
};
jj-starship.url = "github:dmmulroy/jj-starship";
};
outputs = inputs @ {flake-parts, ...}:

View File

@@ -0,0 +1,20 @@
{
input,
prev,
}: let
manifest = (prev.lib.importTOML "${input}/Cargo.toml").package;
in
prev.rustPlatform.buildRustPackage {
pname = manifest.name;
version = manifest.version;
cargoLock.lockFile = "${input}/Cargo.lock";
src = input;
nativeBuildInputs = [prev.pkg-config];
buildInputs = [prev.openssl];
OPENSSL_NO_VENDOR = 1;
doCheck = false;
}

View File

@@ -1,19 +1,7 @@
{inputs}: final: prev: let
manifest = (prev.lib.importTOML "${inputs.jj-ryu}/Cargo.toml").package;
in {
{inputs}: final: prev: {
jj-ryu =
prev.rustPlatform.buildRustPackage {
pname = manifest.name;
version = manifest.version;
cargoLock.lockFile = "${inputs.jj-ryu}/Cargo.lock";
src = inputs.jj-ryu;
nativeBuildInputs = [prev.pkg-config];
buildInputs = [prev.openssl];
OPENSSL_NO_VENDOR = 1;
doCheck = false;
import ../lib/build-rust-package.nix {
inherit prev;
input = inputs.jj-ryu;
};
}

1
overlays/jj-starship.nix Normal file
View File

@@ -0,0 +1 @@
{inputs}: inputs.jj-starship.overlays.default

View File

@@ -1,19 +1,7 @@
{inputs}: final: prev: let
manifest = (prev.lib.importTOML "${inputs.lumen}/Cargo.toml").package;
in {
{inputs}: final: prev: {
lumen =
prev.rustPlatform.buildRustPackage {
pname = manifest.name;
version = manifest.version;
cargoLock.lockFile = "${inputs.lumen}/Cargo.lock";
src = inputs.lumen;
nativeBuildInputs = [prev.pkg-config];
buildInputs = [prev.openssl];
OPENSSL_NO_VENDOR = 1;
doCheck = false;
import ../lib/build-rust-package.nix {
inherit prev;
input = inputs.lumen;
};
}

View File

@@ -10,7 +10,7 @@
cursor-style = block
mouse-hide-while-typing = true
mouse-scroll-multiplier = 1.25
shell-integration = detect
shell-integration = fish
shell-integration-features = no-cursor
clipboard-read = allow
clipboard-write = allow

View File

@@ -1,6 +1,4 @@
{pkgs, ...}: {
home.packages = [pkgs.jj-ryu];
{
programs.jujutsu = {
enable = true;
settings = {
@@ -12,24 +10,37 @@
sign-on-push = true;
subprocess = true;
write-change-id-header = true;
private-commits = "description(glob:'wip:*') | description(glob:'WIP:*') | description(exact:'')";
};
diff = {
tool = "delta";
fsmonitor = {
backend = "watchman";
};
ui = {
default-command = "status";
diff-formatter = ":git";
pager = ["delta" "--pager" "less -FRX"];
diff-editor = ["nvim" "-c" "DiffEditor $left $right $output"];
movement = {
edit = true;
};
};
aliases = {
n = ["new"];
tug = ["bookmark" "move" "--from" "closest_bookmark(@-)" "--to" "@-"];
stack = ["log" "-r" "ancestors((trunk()..@)::bookmarks() | @, 2)"];
stack = ["log" "-r" "stack()"];
retrunk = ["rebase" "-d" "trunk()"];
bm = ["bookmark"];
gf = ["git" "fetch"];
gp = ["git" "push"];
};
revset-aliases = {
"closest_bookmark(to)" = "heads(::to & bookmarks())";
"closest_pushable(to)" = "heads(::to & mutable() & ~description(exact:\"\") & (~empty() | merges()))";
"mine()" = "author(christoph@schmatzler.com)";
"wip()" = "mine() ~ immutable()";
"open()" = "mine() ~ ::trunk()";
"current()" = "@:: & mutable()";
"stack()" = "reachable(@, mutable())";
};
templates = {
draft_commit_description = ''

View File

@@ -10,7 +10,23 @@
model = "opencode/gpt-5-2-codex";
small_model = "opencode/gpt-5-1-codex-mini";
theme = "catppuccin";
permission = "allow";
keybinds = {
leader = "ctrl+o";
};
permission = {
read = {
"*" = "allow";
"*.env" = "deny";
"*.env.*" = "deny";
"*.envrc" = "deny";
"secrets/*" = "deny";
};
};
agent = {
explore = {
model = "opencode/minimax-m2.1-free";
};
};
instructions = [
"CLAUDE.md"
"AGENT.md"
@@ -21,9 +37,37 @@
disabled = true;
};
};
agent = {
explore = {
model = "opencode/minimax-m2.1-free";
mcp = {
context7 = {
enabled = true;
type = "remote";
url = "https://mcp.context7.com/mcp";
};
grep_app = {
enabled = true;
type = "remote";
url = "https://mcp.grep.app";
};
opensrc = {
enabled = true;
type = "local";
command = ["bunx" "opensrc-mcp"];
};
appsignal = {
enabled = false;
type = "local";
command = [
"docker"
"run"
"-i"
"--rm"
"-e"
"APPSIGNAL_API_KEY"
"appsignal/mcp"
];
environment = {
APPSIGNAL_API_KEY = "{env:APPSIGNAL_API_KEY}";
};
};
};
};

View File

@@ -27,6 +27,8 @@ with pkgs;
hledger
htop
hyperfine
jj-ryu
jj-starship
jq
killall
lsof
@@ -45,6 +47,7 @@ with pkgs;
tree-sitter
unzip
vivid
watchman
zip
]
++ lib.optionals stdenv.isDarwin [

View File

@@ -4,6 +4,7 @@
arguments = [
"--max-columns=150"
"--max-columns-preview"
"--hidden"
"--smart-case"
"--colors=column:none"
"--colors=column:fg:4"

View File

@@ -5,7 +5,7 @@
settings = {
add_newline = true;
command_timeout = 2000;
format = "[$directory$\{custom.jj}]($style)$character";
format = "[$directory$\{custom.scm}]($style)$character";
character = {
error_symbol = "[ ](bold #e64553)";
success_symbol = "[](bold #40a02b)[](bold #df8e1d)[](bold #dc8a78)";
@@ -16,29 +16,10 @@
repo_root_style = "bold cyan";
repo_root_format = "[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) ";
};
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 = "🥋";
custom.scm = {
when = "jj-starship detect";
shell = ["jj-starship" "--strip-bookmark-prefix" "cschmatzler/" "--truncate-name" "20" "--bookmarks-display-limit" "1"];
format = "$output ";
};
};
};