refactor
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
jj-starship.url = "github:dmmulroy/jj-starship";
|
jj-starship.url = "github:dmmulroy/jj-starship";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {flake-parts, jj-starship, ...}:
|
outputs = inputs @ {flake-parts, ...}:
|
||||||
flake-parts.lib.mkFlake {inherit inputs;} (
|
flake-parts.lib.mkFlake {inherit inputs;} (
|
||||||
let
|
let
|
||||||
inherit (inputs.nixpkgs) lib;
|
inherit (inputs.nixpkgs) lib;
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
darwinHosts = ["chidi" "jason"];
|
darwinHosts = ["chidi" "jason"];
|
||||||
nixosHosts = ["michael" "tahani"];
|
nixosHosts = ["michael" "tahani"];
|
||||||
|
|
||||||
overlays = import ./overlays {inherit inputs;} ++ [jj-starship.overlays.default];
|
overlays = import ./overlays {inherit inputs;};
|
||||||
nixpkgsConfig = hostPlatform: {
|
nixpkgsConfig = hostPlatform: {
|
||||||
nixpkgs = {inherit hostPlatform overlays;};
|
nixpkgs = {inherit hostPlatform overlays;};
|
||||||
};
|
};
|
||||||
|
|||||||
20
lib/build-rust-package.nix
Normal file
20
lib/build-rust-package.nix
Normal 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;
|
||||||
|
}
|
||||||
@@ -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
1
overlays/jj-starship.nix
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{inputs}: inputs.jj-starship.overlays.default
|
||||||
@@ -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;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -10,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 = ''
|
||||||
|
|||||||
@@ -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"
|
||||||
@@ -22,7 +38,23 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
mcp = {
|
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 = {
|
appsignal = {
|
||||||
|
enabled = false;
|
||||||
type = "local";
|
type = "local";
|
||||||
command = [
|
command = [
|
||||||
"docker"
|
"docker"
|
||||||
@@ -36,12 +68,6 @@
|
|||||||
environment = {
|
environment = {
|
||||||
APPSIGNAL_API_KEY = "{env:APPSIGNAL_API_KEY}";
|
APPSIGNAL_API_KEY = "{env:APPSIGNAL_API_KEY}";
|
||||||
};
|
};
|
||||||
enabled = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
agent = {
|
|
||||||
explore = {
|
|
||||||
model = "opencode/minimax-m2.1-free";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ with pkgs;
|
|||||||
tree-sitter
|
tree-sitter
|
||||||
unzip
|
unzip
|
||||||
vivid
|
vivid
|
||||||
|
watchman
|
||||||
zip
|
zip
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.isDarwin [
|
++ lib.optionals stdenv.isDarwin [
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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 = "🥋";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user