fix: install gemini cli with npm

This commit is contained in:
Poby 2026-05-11 22:55:45 +09:00
parent f1be5b3ca8
commit 7be0d2eafc
No known key found for this signature in database
2 changed files with 12 additions and 4 deletions

View file

@ -1,5 +1,6 @@
{ {
config, config,
lib,
pkgs, pkgs,
... ...
}: { }: {
@ -12,4 +13,15 @@
home.sessionPath = [ home.sessionPath = [
"${config.home.homeDirectory}/.npm/bin" "${config.home.homeDirectory}/.npm/bin"
]; ];
home.activation.installGeminiCli = lib.hm.dag.entryAfter ["writeBoundary"] ''
npm_prefix="${config.home.homeDirectory}/.npm"
run mkdir -p "$npm_prefix/bin"
run env \
HOME="${config.home.homeDirectory}" \
NPM_CONFIG_USERCONFIG="${config.home.homeDirectory}/.npmrc" \
PATH="${pkgs.nodejs_24}/bin:$PATH" \
"${pkgs.nodejs_24}/bin/npm" install --global --prefix "$npm_prefix" --no-audit --no-fund @google/gemini-cli@latest
'';
} }

View file

@ -24,10 +24,6 @@
Bitwarden = 1352778147; Bitwarden = 1352778147;
}; };
brews = [
"gemini-cli"
];
casks = [ casks = [
"arc" "arc"
"batfi" "batfi"