Compare commits

...

10 commits

Author SHA1 Message Date
5287411131 changes 2026-04-30 23:26:45 -04:00
9feb01d2d6 updated 2026-04-30 22:58:18 -04:00
0125273b57 chore(git): bump submodule 2026-04-30 22:43:48 -04:00
9a9aa63564 big updates 2026-04-30 22:35:09 -04:00
52ba79c38d fixed nix-ld 2026-04-30 22:07:51 -04:00
25d2c27935 chore(nvim) bump submodule 2026-04-30 22:02:20 -04:00
1012029022 updated 2026-04-30 21:43:28 -04:00
Bryan Ramos
9f4e6c6a65 remove opencode 2026-04-27 17:26:00 -04:00
Bryan Ramos
133817cdc3 bump pi config submodule 2026-04-27 17:22:08 -04:00
Bryan Ramos
d29ec32959 add pi coding agent module
Manages `~/.pi/agent` config via the itme-brain/pi submodule and
provides nodejs_20 with NPM_CONFIG_PREFIX=~/.npm-global so pi and its
extensions install via the global npm ecosystem.

Pi itself and extensions like pi-mcp-adapter are installed manually
via `npm install -g` rather than packaged through nix — the ecosystem
moves too fast to keep derivations current.
2026-04-27 16:55:26 -04:00
18 changed files with 159 additions and 75 deletions

3
.gitmodules vendored
View file

@ -14,3 +14,6 @@
path = user/modules/bash/bash
url = https://github.com/itme-brain/bash.git
branch = master
[submodule "user/modules/pi/agent"]
path = user/modules/pi/agent
url = git@github.com:itme-brain/pi.git

42
flake.lock generated
View file

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1773025010,
"narHash": "sha256-khlHllTsovXgT2GZ0WxT4+RvuMjNeR5OW0UYeEHPYQo=",
"lastModified": 1776613567,
"narHash": "sha256-gC9Cp5ibBmGD5awCA9z7xy6MW6iJufhazTYJOiGlCUI=",
"owner": "nix-community",
"repo": "disko",
"rev": "7b9f7f88ab3b339f8142dc246445abb3c370d3d3",
"rev": "32f4236bfc141ae930b5ba2fb604f561fed5219d",
"type": "github"
},
"original": {
@ -64,11 +64,11 @@
]
},
"locked": {
"lastModified": 1772985280,
"narHash": "sha256-FdrNykOoY9VStevU4zjSUdvsL9SzJTcXt4omdEDZDLk=",
"lastModified": 1775425411,
"narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "8f736f007139d7f70752657dff6a401a585d6cbc",
"rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe",
"type": "github"
},
"original": {
@ -102,11 +102,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1773375660,
"narHash": "sha256-SEzUWw2Rf5Ki3bcM26nSKgbeoqi2uYy8IHVBqOKjX3w=",
"lastModified": 1777428379,
"narHash": "sha256-ypxFOeDz+CqADEQNL72haqGjvZQdBR5Vc7pyx2JDttI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3e20095fe3c6cbb1ddcef89b26969a69a1570776",
"rev": "755f5aa91337890c432639c60b6064bb7fe67769",
"type": "github"
},
"original": {
@ -118,11 +118,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1776169885,
"narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=",
"lastModified": 1777268161,
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9",
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
"type": "github"
},
"original": {
@ -134,11 +134,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1772963539,
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
"lastModified": 1777268161,
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
"type": "github"
},
"original": {
@ -154,11 +154,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1773108757,
"narHash": "sha256-3BAoe2R6YA6Xjdsgx3urZ4Ns3LeTy0E/w5d1wPny910=",
"lastModified": 1777603930,
"narHash": "sha256-IkawcGZuNSlf7mkiGo6NgmZir248sd6mVvUj1kuPIMw=",
"owner": "nix-community",
"repo": "NUR",
"rev": "9f2c583704f122828e6f9893416ca3b007464ee6",
"rev": "e7e4dc38580b7ef29d36d4afd3ba808e4f7ef5d5",
"type": "github"
},
"original": {
@ -185,11 +185,11 @@
]
},
"locked": {
"lastModified": 1773550941,
"narHash": "sha256-wa/++bL2QeMUreNFBZEWluQfOYB0MnQIeGNMuaX9sfs=",
"lastModified": 1777338324,
"narHash": "sha256-bc+ZZCmOTNq86/svGnw0tVpH7vJaLYvGLLKFYP08Q8E=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "c469b6885f0dcd5c7c56bd935a0f08dbcd9e79e1",
"rev": "8eaee5c45428b28b8c47a83e4c09dccec5f279b5",
"type": "github"
},
"original": {

View file

@ -81,6 +81,8 @@
writing.enable = true;
};
pi.enable = true;
gui = {
wm.hyprland.enable = true;
browser.firefox.enable = true;

View file

@ -66,6 +66,13 @@ in
};
};
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
icu
];
};
boot.loader = {
systemd-boot = {
enable = true;

@ -1 +1 @@
Subproject commit 6667f36a9f83a88b33b691a5a9b701365267bbb3
Subproject commit f0fe41e942dfedab23828131372a5545a6d5c4c6

View file

@ -13,7 +13,7 @@ in
};
home.file.".config/bash" = {
source = ./bash;
source = config.lib.file.mkOutOfStoreSymlink ./bash;
recursive = true;
};

View file

@ -8,9 +8,6 @@ in
{ options.modules.user.git = { enable = mkEnableOption "user.git"; };
config = mkIf cfg.enable {
programs = {
git = {
enable = true;
};
gh = {
enable = true;
settings.git_protocol = "ssh";
@ -19,10 +16,11 @@ in
home = {
packages = with pkgs; [
git
git-crypt
];
file.".config/git" = {
source = ./git;
source = config.lib.file.mkOutOfStoreSymlink ./git;
recursive = true;
};
};

@ -1 +1 @@
Subproject commit 8b16b7047c3fa70945cca5a058408b57b2ef2e7f
Subproject commit 7ea8c164bc6ab3eaea2ff5743cfa2db62fd62397

View file

@ -25,29 +25,29 @@ in
colors = {
primary = {
background = "#000000";
foreground = "#cdd6f4";
foreground = "#dadada";
};
normal = {
black = "#1e2127";
red = "#e06c75";
green = "#98c379";
yellow = "#d19a66";
blue = "#61afef";
magenta = "#c678dd";
cyan = "#56b6c2";
white = "#abb2bf";
black = "#181818";
red = "#ff6b6b";
green = "#00b300";
yellow = "#e8a060";
blue = "#88ddcc";
magenta = "#c490d0";
cyan = "#b3f6c0";
white = "#dadada";
};
bright = {
black = "#5c6370";
red = "#e06c75";
green = "#98c379";
yellow = "#d19a66";
blue = "#61afef";
magenta = "#c678dd";
cyan = "#56b6c2";
white = "#ffffff";
black = "#5a5a5a";
red = "#ff6b6b";
green = "#00b300";
yellow = "#ffcc00";
blue = "#88ddcc";
magenta = "#c490d0";
cyan = "#b3f6c0";
white = "#ffffff";
};
};

View file

@ -11,6 +11,7 @@ in
home.packages = with pkgs; [
gimp
libreoffice
signal-desktop
];
};
}

View file

@ -12,11 +12,26 @@ in
defaultEditor = true;
vimAlias = true;
vimdiffAlias = true;
extraPackages = import ./pkgs.nix { inherit pkgs; };
extraWrapperArgs = [
"--suffix"
"PATH"
":"
"${config.home.homeDirectory}/.npm-global/bin"
];
extraPackages = with pkgs; [
gcc
cargo
rustc
fzf
fd
ripgrep
bat
];
};
home.file.".config/nvim" = {
source = ./nvim;
source = config.lib.file.mkOutOfStoreSymlink ./nvim;
recursive = true;
};
};

@ -1 +1 @@
Subproject commit da6106c77470b336783951ff2bce795688e9663d
Subproject commit 376b9c5c16b9d8b121b73516219082e57b397bc9

View file

@ -1,24 +0,0 @@
{ pkgs, ... }:
let
# Essential LSPs for config files (project-specific LSPs go in devShells)
lsp = with pkgs; [
nixd
lua-language-server
marksman
taplo
];
lsp' = with pkgs.nodePackages; [
vscode-langservers-extracted # jsonls, html, cssls
bash-language-server
yaml-language-server
];
extraPackages = with pkgs; [
lazygit
gcc
];
in
extraPackages ++ lsp ++ lsp'

1
user/modules/pi/agent Submodule

@ -0,0 +1 @@
Subproject commit b0524fdd3056c7dd951b41f7da410dde37f91a67

View file

@ -0,0 +1,82 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.modules.user.pi;
npmGlobal = "${config.home.homeDirectory}/.npm-global";
piVersion = "0.70.5";
in
{ options.modules.user.pi = { enable = mkEnableOption "user.pi"; };
config = mkIf cfg.enable {
home.packages = with pkgs; [ nodejs_20 ];
home.sessionVariables = {
LLAMACPP_BASE_URL = "https://ai.ramos.codes/v1";
NPM_CONFIG_PREFIX = npmGlobal;
};
home.sessionPath = [ "${npmGlobal}/bin" ];
programs.bash.initExtra = ''
export LLAMACPP_API_KEY=$(cat /run/secrets/LLAMA_API_KEY)
'';
home.activation.installPiCodingAgent = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
PATH="${pkgs.nodejs_20}/bin:$PATH"
agentDir="${config.home.homeDirectory}/.pi/agent"
piPkgScope="${npmGlobal}/lib/node_modules/@mariozechner"
piPkgDir="${npmGlobal}/lib/node_modules/@mariozechner/pi-coding-agent"
piBin="${npmGlobal}/bin/pi"
run mkdir -p ${npmGlobal}
run mkdir -p "${npmGlobal}/bin"
run mkdir -p "$piPkgScope"
run mkdir -p "${config.home.homeDirectory}/.pi"
run mkdir -p "$agentDir"
if [ -e "$agentDir" ]; then
run chmod -R u+w "$agentDir"
run find "$agentDir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
fi
run cp -R ${./agent}/. "$agentDir"/
run chmod -R u+w "$agentDir"
run rm -f "$piBin"
run rm -f "${npmGlobal}/bin"/.pi-*
run rm -rf "$piPkgDir"
run rm -rf "$piPkgScope"/.pi-coding-agent-*
if ! run ${pkgs.nodejs_20}/bin/npm install -g --prefix ${npmGlobal} @mariozechner/pi-coding-agent@${piVersion}; then
warnEcho "pi-coding-agent install failed (offline or registry error)"
fi
if [ ! -f "$piPkgDir/package.json" ]; then
for candidate in "$piPkgScope"/.pi-coding-agent-*; do
if [ -f "$candidate/package.json" ]; then
run rm -rf "$piPkgDir"
run mv "$candidate" "$piPkgDir"
break
fi
done
fi
if [ -f "$piPkgDir/dist/cli.js" ]; then
run ln -sfn ../lib/node_modules/@mariozechner/pi-coding-agent/dist/cli.js "$piBin"
run chmod +x "$piPkgDir/dist/cli.js"
else
warnEcho "pi-coding-agent install did not produce dist/cli.js"
fi
for ext in "$agentDir"/extensions/*; do
if [ -f "$ext/package.json" ]; then
if [ -f "$ext/package-lock.json" ]; then
if ! run ${pkgs.nodejs_20}/bin/npm ci --prefix "$ext"; then
warnEcho "pi extension dependency install failed for $ext"
fi
else
if ! run ${pkgs.nodejs_20}/bin/npm install --prefix "$ext"; then
warnEcho "pi extension dependency install failed for $ext"
fi
fi
fi
done
'';
};
}

View file

@ -9,7 +9,6 @@ in
home.packages = with pkgs; [
unstable.claude-code
unstable.codex
unstable.opencode
bubblewrap

View file

@ -16,7 +16,7 @@ in
vim
];
file.".vim" = {
source = ./vim;
source = config.lib.file.mkOutOfStoreSymlink ./vim;
recursive = true;
};
};

@ -1 +1 @@
Subproject commit 8c8a4e4a7afd175be2eb97055bb01f43ee8b992d
Subproject commit d5bdb39d7e65e679b3052e5ec437f75e4ec8e594