This commit is contained in:
2026-01-20 17:10:49 +00:00
parent 73f8184b05
commit d84646800c
11 changed files with 88 additions and 69 deletions

View File

@@ -47,7 +47,7 @@
jj-starship.url = "github:dmmulroy/jj-starship";
};
outputs = inputs @ {flake-parts, jj-starship, ...}:
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} (
let
inherit (inputs.nixpkgs) lib;
@@ -57,7 +57,7 @@
darwinHosts = ["chidi" "jason"];
nixosHosts = ["michael" "tahani"];
overlays = import ./overlays {inherit inputs;} ++ [jj-starship.overlays.default];
overlays = import ./overlays {inherit inputs;};
nixpkgsConfig = hostPlatform: {
nixpkgs = {inherit hostPlatform overlays;};
};

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

@@ -10,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"
@@ -22,7 +38,23 @@
};
};
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"
@@ -36,12 +68,6 @@
environment = {
APPSIGNAL_API_KEY = "{env:APPSIGNAL_API_KEY}";
};
enabled = true;
};
};
agent = {
explore = {
model = "opencode/minimax-m2.1-free";
};
};
};

View File

@@ -47,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 ";
};
};
};