This commit is contained in:
Bryan Ramos 2026-04-30 23:26:45 -04:00
parent 9feb01d2d6
commit 5287411131
7 changed files with 58 additions and 26 deletions

View file

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

View file

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

View file

@ -12,6 +12,12 @@ in
defaultEditor = true;
vimAlias = true;
vimdiffAlias = true;
extraWrapperArgs = [
"--suffix"
"PATH"
":"
"${config.home.homeDirectory}/.npm-global/bin"
];
extraPackages = with pkgs; [
gcc
cargo
@ -25,7 +31,7 @@ in
};
home.file.".config/nvim" = {
source = ./nvim;
source = config.lib.file.mkOutOfStoreSymlink ./nvim;
recursive = true;
};
};

@ -1 +1 @@
Subproject commit 14a67ba7d3210d915e26588da9d0326e8118d353
Subproject commit 376b9c5c16b9d8b121b73516219082e57b397bc9

View file

@ -25,7 +25,12 @@ in
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
@ -34,10 +39,31 @@ in
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

View file

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