From 5287411131920ecd08d231cc2261d822e4b25401 Mon Sep 17 00:00:00 2001 From: Bryan Ramos Date: Thu, 30 Apr 2026 23:26:45 -0400 Subject: [PATCH] changes --- flake.lock | 42 ++++++++++++++++----------------- user/modules/bash/default.nix | 2 +- user/modules/git/default.nix | 2 +- user/modules/neovim/default.nix | 8 ++++++- user/modules/neovim/nvim | 2 +- user/modules/pi/default.nix | 26 ++++++++++++++++++++ user/modules/vim/default.nix | 2 +- 7 files changed, 58 insertions(+), 26 deletions(-) diff --git a/flake.lock b/flake.lock index 2eb1556..a2673aa 100644 --- a/flake.lock +++ b/flake.lock @@ -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": 1776548001, - "narHash": "sha256-ZSK0NL4a1BwVbbTBoSnWgbJy9HeZFXLYQizjb2DPF24=", + "lastModified": 1777268161, + "narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b12141ef619e0a9c1c84dc8c684040326f27cdcc", + "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": { diff --git a/user/modules/bash/default.nix b/user/modules/bash/default.nix index a1420a7..631890b 100644 --- a/user/modules/bash/default.nix +++ b/user/modules/bash/default.nix @@ -13,7 +13,7 @@ in }; home.file.".config/bash" = { - source = ./bash; + source = config.lib.file.mkOutOfStoreSymlink ./bash; recursive = true; }; diff --git a/user/modules/git/default.nix b/user/modules/git/default.nix index 8d95730..aa2ff58 100644 --- a/user/modules/git/default.nix +++ b/user/modules/git/default.nix @@ -20,7 +20,7 @@ in git-crypt ]; file.".config/git" = { - source = ./git; + source = config.lib.file.mkOutOfStoreSymlink ./git; recursive = true; }; }; diff --git a/user/modules/neovim/default.nix b/user/modules/neovim/default.nix index 838065d..2c81e51 100644 --- a/user/modules/neovim/default.nix +++ b/user/modules/neovim/default.nix @@ -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; }; }; diff --git a/user/modules/neovim/nvim b/user/modules/neovim/nvim index 14a67ba..376b9c5 160000 --- a/user/modules/neovim/nvim +++ b/user/modules/neovim/nvim @@ -1 +1 @@ -Subproject commit 14a67ba7d3210d915e26588da9d0326e8118d353 +Subproject commit 376b9c5c16b9d8b121b73516219082e57b397bc9 diff --git a/user/modules/pi/default.nix b/user/modules/pi/default.nix index 7452bb4..aa3bf51 100644 --- a/user/modules/pi/default.nix +++ b/user/modules/pi/default.nix @@ -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 diff --git a/user/modules/vim/default.nix b/user/modules/vim/default.nix index 68aed8a..05a1ce4 100644 --- a/user/modules/vim/default.nix +++ b/user/modules/vim/default.nix @@ -16,7 +16,7 @@ in vim ]; file.".vim" = { - source = ./vim; + source = config.lib.file.mkOutOfStoreSymlink ./vim; recursive = true; }; };