meow
This commit is contained in:
+222
-5
@@ -1,10 +1,227 @@
|
||||
{ den, modules, ... }:
|
||||
{
|
||||
den,
|
||||
modules,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
modules.pi-coding = {
|
||||
homeManager = {
|
||||
programs.pi-coding-agent = {
|
||||
enable = true;
|
||||
homeManager =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.pi-coding-agent = {
|
||||
enable = true;
|
||||
extraPackages = [
|
||||
pkgs.nodejs
|
||||
# pkgs.lean-lsp-mcp
|
||||
];
|
||||
package = pkgs.pi-coding-agent.overrideAttrs (
|
||||
new: old: {
|
||||
version = "0.81.1";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "earendil-works";
|
||||
repo = "pi";
|
||||
tag = "v${new.version}";
|
||||
hash = "sha256-xo3uoR7HceOCL3wqoMcacOe8WXP1o7ReAXne5t6Hgao=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-lzKQZbnITzgV9koucsMno6f61ubBLYUcwQEXtak1r1s=";
|
||||
# npmDepsHash = pkgs.lib.fakeHash;
|
||||
|
||||
# npmDepsHash = "sha256-lDoj/94tjJd4ZGU9WgrMOqNSmdpeCljU4c6jGX+TSDY=";
|
||||
|
||||
npmDeps = pkgs.fetchNpmDeps {
|
||||
inherit (new) src;
|
||||
name = "pi-coding-agent-0.81.1-npm-deps";
|
||||
hash = new.npmDepsHash;
|
||||
};
|
||||
modelData = pkgs.fetchurl {
|
||||
url = "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-${new.version}.tgz";
|
||||
hash = "sha256-x53MD5DU370ZdNoz36P+OWZjGVpoM5sfVcEU2/ckDy8=";
|
||||
# hash = pkgs.lib.fakeHash;
|
||||
};
|
||||
preConfigure = ''
|
||||
mkdir -p packages/ai/src/providers/data
|
||||
tar --extract --gzip --file=${new.modelData} \
|
||||
--directory=packages/ai/src/providers/data \
|
||||
--strip-components=4 \
|
||||
package/dist/providers/data
|
||||
'';
|
||||
passthru.updateScript = pkgs.nix-update-script {
|
||||
extraArgs = [
|
||||
"--custom-dep"
|
||||
"modelData"
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
settings = {
|
||||
"litellm" = {
|
||||
"providers" = {
|
||||
"litellm" = {
|
||||
"displayName" = "scuggo";
|
||||
"baseUrl" = "https://9f5db439.fwds.scug.io";
|
||||
"apiKey" = "$SCUG_IO_API_KEY";
|
||||
"compat" = {
|
||||
"sendSessionAffinityHeaders" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
"skills" = {
|
||||
"enabled" = true;
|
||||
};
|
||||
"compat" = {
|
||||
"sendSessionAffinityHeaders" = true;
|
||||
};
|
||||
"mcp" = {
|
||||
"enabled" = true;
|
||||
};
|
||||
"showCacheMissNotices" = true;
|
||||
"qol" = {
|
||||
"permissionGate" = {
|
||||
"enabled" = true;
|
||||
"commands" = "rm -Rf,rm -rf,sudo,chmod,chown,mkfs,dd,shutdown,reboot,poweroff";
|
||||
"previewLines" = 12;
|
||||
"previewChars" = 1200;
|
||||
};
|
||||
};
|
||||
};
|
||||
"mcp" = {
|
||||
"enabled" = true;
|
||||
};
|
||||
packages = [
|
||||
# "npm:@odinlayer/pi-provider-litellm"
|
||||
# "npm:pi-provider-litellm"
|
||||
"npm:@juanibiapina/pi-extension-settings"
|
||||
"git:github.com/balcsida/pi-provider-litellm"
|
||||
# "npm:pi-web-access"
|
||||
# "npm:@gotgenes/pi-permission-system"
|
||||
"npm:@vanillagreen/pi-qol"
|
||||
"npm:pi-vitals"
|
||||
"npm:pi-spark"
|
||||
"npm:@zhushanwen/pi-context-engineering"
|
||||
"npm:pi-caveman"
|
||||
"npm:@tmustier/pi-usage-extension"
|
||||
"npm:@heyhuynhgiabuu/pi-pretty"
|
||||
"npm:pi-lens"
|
||||
# "npm:pi-lean-ctx"
|
||||
# "npm:@rohaquinlop/pi-deepseek-cache"
|
||||
"npm:pi-cache-optimizer"
|
||||
];
|
||||
};
|
||||
context = "Heavily prefer to use any appropriate tools instead of raw cmd";
|
||||
};
|
||||
|
||||
# pi-vitals config
|
||||
home.file.".pi/agent/powerline.json" = {
|
||||
text = builtins.toJSON {
|
||||
leftSegments = [
|
||||
"pi"
|
||||
"separator"
|
||||
"model"
|
||||
"thinking"
|
||||
"ext_status"
|
||||
"separator"
|
||||
"path"
|
||||
"git"
|
||||
"separator"
|
||||
"token_total"
|
||||
"token_in"
|
||||
"token_out"
|
||||
"cache_read"
|
||||
"cache_write"
|
||||
];
|
||||
rightSegments = [
|
||||
"separator"
|
||||
"cost"
|
||||
"context_pct"
|
||||
];
|
||||
icons = {
|
||||
pi = "π";
|
||||
model = "◈";
|
||||
thinking = "🧠";
|
||||
folder = "📁";
|
||||
repo = "📦";
|
||||
git = "⎇";
|
||||
tokens = "⊛";
|
||||
input = "↑";
|
||||
output = "↓";
|
||||
cacheRead = "↙";
|
||||
cacheWrite = "↗";
|
||||
contextPct = "◫";
|
||||
cost = "$";
|
||||
separator = "│";
|
||||
};
|
||||
colors = {
|
||||
pi = "accent";
|
||||
model = "#d787af";
|
||||
path = "#00afaf";
|
||||
git = "success";
|
||||
gitDirty = "warning";
|
||||
gitClean = "success";
|
||||
thinking = "muted";
|
||||
context = "dim";
|
||||
contextWarn = "warning";
|
||||
contextError = "error";
|
||||
cost = "text";
|
||||
tokens = "muted";
|
||||
separator = "dim";
|
||||
};
|
||||
segmentOptions = {
|
||||
path = {
|
||||
mode = "basename";
|
||||
};
|
||||
git = {
|
||||
showBranch = true;
|
||||
showStaged = true;
|
||||
showUnstaged = true;
|
||||
showUntracked = true;
|
||||
};
|
||||
context_pct = {
|
||||
showAutoIcon = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# pi-spark config
|
||||
home.file.".pi/agent/spark.json" = {
|
||||
text = builtins.toJSON {
|
||||
editor = {
|
||||
spinner = "tildes";
|
||||
};
|
||||
footer = false;
|
||||
presets = {
|
||||
"scuggo" = {
|
||||
provider = "litellm";
|
||||
model = "meow";
|
||||
thinkingLevel = "medium";
|
||||
};
|
||||
"claude" = {
|
||||
provider = "anthropic";
|
||||
model = "claude-opus-4-8";
|
||||
thinkingLevel = "high";
|
||||
};
|
||||
"gpt" = {
|
||||
provider = "openai-codex";
|
||||
model = "gpt-5.5";
|
||||
thinkingLevel = "medium";
|
||||
};
|
||||
};
|
||||
recap = {
|
||||
idle = "5m";
|
||||
provider = "openai-codex";
|
||||
model = "gpt-5.4-mini";
|
||||
thinkingLevel = "off";
|
||||
};
|
||||
title = {
|
||||
provider = "openai-codex";
|
||||
model = "gpt-5.4-mini";
|
||||
thinkingLevel = "off";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user