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

View File

@@ -44,6 +44,7 @@
url = "github:dmmulroy/jj-ryu"; url = "github:dmmulroy/jj-ryu";
flake = false; flake = false;
}; };
jj-starship.url = "github:dmmulroy/jj-starship";
}; };
outputs = inputs @ {flake-parts, ...}: 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 {inputs}: final: prev: {
manifest = (prev.lib.importTOML "${inputs.jj-ryu}/Cargo.toml").package;
in {
jj-ryu = jj-ryu =
prev.rustPlatform.buildRustPackage { import ../lib/build-rust-package.nix {
pname = manifest.name; inherit prev;
version = manifest.version; input = inputs.jj-ryu;
cargoLock.lockFile = "${inputs.jj-ryu}/Cargo.lock";
src = inputs.jj-ryu;
nativeBuildInputs = [prev.pkg-config];
buildInputs = [prev.openssl];
OPENSSL_NO_VENDOR = 1;
doCheck = false;
}; };
} }

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

View File

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

View File

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

View File

@@ -10,7 +10,23 @@
model = "opencode/gpt-5-2-codex"; model = "opencode/gpt-5-2-codex";
small_model = "opencode/gpt-5-1-codex-mini"; small_model = "opencode/gpt-5-1-codex-mini";
theme = "catppuccin"; 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 = [ instructions = [
"CLAUDE.md" "CLAUDE.md"
"AGENT.md" "AGENT.md"
@@ -21,9 +37,37 @@
disabled = true; disabled = true;
}; };
}; };
agent = { mcp = {
explore = { context7 = {
model = "opencode/minimax-m2.1-free"; 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 hledger
htop htop
hyperfine hyperfine
jj-ryu
jj-starship
jq jq
killall killall
lsof lsof
@@ -45,6 +47,7 @@ with pkgs;
tree-sitter tree-sitter
unzip unzip
vivid vivid
watchman
zip zip
] ]
++ lib.optionals stdenv.isDarwin [ ++ lib.optionals stdenv.isDarwin [

View File

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

View File

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