fix: npm-global PATH for codex/gemini-cli
This commit is contained in:
@@ -73,18 +73,9 @@
|
||||
dconf
|
||||
];
|
||||
|
||||
# ── Post-activation: Install npm-only tools ────────────
|
||||
# Codex and Gemini CLI aren't in nixpkgs; install them
|
||||
# globally via npm after first `nixos-rebuild switch`.
|
||||
home.activation.installNpmTools = config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||
export PATH="${pkgs.nodejs}/bin:$PATH"
|
||||
if ! command -v codex &> /dev/null; then
|
||||
echo "Installing @openai/codex via npm..."
|
||||
${pkgs.nodejs}/bin/npm i -g @openai/codex 2>/dev/null || true
|
||||
fi
|
||||
if ! command -v gemini &> /dev/null; then
|
||||
echo "Installing @google/gemini-cli via npm..."
|
||||
${pkgs.nodejs}/bin/npm i -g @google/gemini-cli 2>/dev/null || true
|
||||
fi
|
||||
'';
|
||||
# ── npm global tools (codex, gemini-cli) ────────────────
|
||||
# These aren't in nixpkgs. Install once after first boot:
|
||||
# mkdir -p ~/.npm-global && npm config set prefix ~/.npm-global
|
||||
# npm i -g @openai/codex @google/gemini-cli
|
||||
# PATH is set in shell.nix via ~/.npm-global/bin
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user