Commit 67eff987002f
Changed files (2)
lib
tools
shpool-ssh-wrapper
lib/functions.nix
@@ -155,8 +155,8 @@ let
else
x;
forwardAgent = true;
- # Disable IdentityAgent for .home hosts (prevents yubikey prompts in TRAMP)
- extraOptions = lib.optionalAttrs (lib.strings.hasSuffix ".home" x) {
+ # Disable IdentityAgent only for aomi.home (prevents yubikey prompts in TRAMP)
+ extraOptions = lib.optionalAttrs (x == "aomi.home") {
IdentityAgent = "none";
};
};
tools/shpool-ssh-wrapper/default.nix
@@ -1,5 +1,15 @@
{ pkgs }:
+let
+ # Helper script to start Claude Code with Vertex AI environment
+ claude-vertex = pkgs.writeShellScript "claude-vertex" ''
+ export CLAUDE_CODE_USE_VERTEX=1
+ export CLOUD_ML_REGION=us-east5
+ export ANTHROPIC_VERTEX_PROJECT_ID=itpc-gcp-pnd-pe-eng-claude
+ exec claude
+ '';
+in
+
pkgs.writeScriptBin "shpool-ssh-wrapper" ''
#!${pkgs.bash}/bin/bash
# Shpool SSH wrapper - automatically runs commands for specific session patterns
@@ -20,8 +30,8 @@ pkgs.writeScriptBin "shpool-ssh-wrapper" ''
case "$SESSION_NAME" in
claude/*)
# Claude Code session - run with Vertex AI environment
- # Run via shell to get proper PATH and environment
- run_with_command "$SESSION_NAME" "zsh -l -c 'env CLAUDE_CODE_USE_VERTEX=1 CLOUD_ML_REGION=us-east5 ANTHROPIC_VERTEX_PROJECT_ID=itpc-gcp-pnd-pe-eng-claude claude'"
+ # Use helper script since shpool -c expects a binary, not a shell command
+ run_with_command "$SESSION_NAME" "${claude-vertex}"
;;
*)
# Default: just attach to session with default shell