fix: npm-global PATH for codex/gemini-cli
This commit is contained in:
@@ -73,18 +73,9 @@
|
|||||||
dconf
|
dconf
|
||||||
];
|
];
|
||||||
|
|
||||||
# ── Post-activation: Install npm-only tools ────────────
|
# ── npm global tools (codex, gemini-cli) ────────────────
|
||||||
# Codex and Gemini CLI aren't in nixpkgs; install them
|
# These aren't in nixpkgs. Install once after first boot:
|
||||||
# globally via npm after first `nixos-rebuild switch`.
|
# mkdir -p ~/.npm-global && npm config set prefix ~/.npm-global
|
||||||
home.activation.installNpmTools = config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
# npm i -g @openai/codex @google/gemini-cli
|
||||||
export PATH="${pkgs.nodejs}/bin:$PATH"
|
# PATH is set in shell.nix via ~/.npm-global/bin
|
||||||
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
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
initContent = ''
|
initContent = ''
|
||||||
|
# npm global bin (codex, gemini-cli)
|
||||||
|
export PATH="$HOME/.npm-global/bin:$PATH"
|
||||||
|
|
||||||
# Force Atuin up-arrow binding
|
# Force Atuin up-arrow binding
|
||||||
bindkey '^[[A' atuin-up-search
|
bindkey '^[[A' atuin-up-search
|
||||||
bindkey '^[OA' atuin-up-search
|
bindkey '^[OA' atuin-up-search
|
||||||
|
|||||||
Reference in New Issue
Block a user