[development] Fix humanlayer plugins
Removes model specification to better support Claude Code Pro plan. Because of this, I also re-removed this role from home-darwin-work as we can take advantage of more powerful models in that context. We will just need to install the plugins external from nix. Eventually I can turn this into a config option of course. Also made sure we are installing the agents from the plugin in addition to the commands.
This commit is contained in:
@@ -222,7 +222,6 @@ in
|
|||||||
|
|
||||||
home.roles = {
|
home.roles = {
|
||||||
base.enable = true;
|
base.enable = true;
|
||||||
development.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|||||||
@@ -31,24 +31,41 @@ in
|
|||||||
|
|
||||||
programs.kubectl-secure.enable = true;
|
programs.kubectl-secure.enable = true;
|
||||||
|
|
||||||
# Install Claude Code humanlayer command plugins
|
# Install Claude Code humanlayer command and agent plugins
|
||||||
home.activation.claudeCodeCommands = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
home.activation.claudeCodeCommands = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
# Clean up old plugin-installed commands to avoid duplicates
|
# Clean up old plugin-installed commands and agents to avoid duplicates
|
||||||
rm -f ~/.claude/commands/humanlayer:* 2>/dev/null || true
|
rm -f ~/.claude/commands/humanlayer:* 2>/dev/null || true
|
||||||
|
rm -f ~/.claude/agents/humanlayer:* 2>/dev/null || true
|
||||||
|
|
||||||
# Create commands directory if it doesn't exist
|
# Create directories if they don't exist
|
||||||
mkdir -p ~/.claude/commands
|
mkdir -p ~/.claude/commands
|
||||||
|
mkdir -p ~/.claude/agents
|
||||||
|
|
||||||
# Copy all humanlayer command files
|
# Copy all humanlayer command files and remove model specifications
|
||||||
for file in ${claudePluginsRepo}/humanlayer/commands/*.md; do
|
for file in ${claudePluginsRepo}/humanlayer/commands/*.md; do
|
||||||
if [ -f "$file" ]; then
|
if [ -f "$file" ]; then
|
||||||
filename=$(basename "$file" .md)
|
filename=$(basename "$file" .md)
|
||||||
# Create symlink with the namespace prefix
|
dest="$HOME/.claude/commands/humanlayer:''${filename}.md"
|
||||||
ln -sf "$file" ~/.claude/commands/humanlayer:''${filename}.md
|
|
||||||
|
# Copy file and remove the "model:" line from frontmatter
|
||||||
|
# This allows Claude Code Pro to use the default model
|
||||||
|
${pkgs.gnused}/bin/sed '/^model:/d' "$file" > "$dest"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
$DRY_RUN_CMD echo "Claude Code humanlayer commands installed successfully"
|
# Copy all humanlayer agent files and remove model specifications
|
||||||
|
for file in ${claudePluginsRepo}/humanlayer/agents/*.md; do
|
||||||
|
if [ -f "$file" ]; then
|
||||||
|
filename=$(basename "$file" .md)
|
||||||
|
dest="$HOME/.claude/agents/humanlayer:''${filename}.md"
|
||||||
|
|
||||||
|
# Copy file and remove the "model:" line from frontmatter
|
||||||
|
# This allows Claude Code Pro to use the default model
|
||||||
|
${pkgs.gnused}/bin/sed '/^model:/d' "$file" > "$dest"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
$DRY_RUN_CMD echo "Claude Code humanlayer commands and agents installed successfully (model selection removed)"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Note: modules must be imported at top-level home config
|
# Note: modules must be imported at top-level home config
|
||||||
|
|||||||
Reference in New Issue
Block a user