{ config, lib, pkgs, globalInputs, system, ... }: with lib; let cfg = config.home.roles.development; # Fetch the claude-plugins repository # Update the rev to get newer versions of the commands claudePluginsRepo = builtins.fetchGit { url = "https://github.com/jeffh/claude-plugins.git"; # To update: change this to the latest commit hash # You can find the latest commit at: https://github.com/jeffh/claude-plugins/commits/main rev = "5e3e4d937162185b6d78c62022cbfd1c8ad42c4c"; ref = "main"; }; in { options.home.roles.development = { enable = mkEnableOption "Enable development tools and utilities"; }; config = mkIf cfg.enable { home.packages = [ pkgs.unstable.claude-code pkgs.codex # Custom packages pkgs.custom.tea-rbw ]; programs.kubectl-secure.enable = true; # Install Claude Code humanlayer command plugins home.activation.claudeCodeCommands = lib.hm.dag.entryAfter ["writeBoundary"] '' # Clean up old plugin-installed commands to avoid duplicates rm -f ~/.claude/commands/humanlayer:* 2>/dev/null || true # Create commands directory if it doesn't exist mkdir -p ~/.claude/commands # Copy all humanlayer command files for file in ${claudePluginsRepo}/humanlayer/commands/*.md; do if [ -f "$file" ]; then filename=$(basename "$file" .md) # Create symlink with the namespace prefix ln -sf "$file" ~/.claude/commands/humanlayer:''${filename}.md fi done $DRY_RUN_CMD echo "Claude Code humanlayer commands installed successfully" ''; # Note: modules must be imported at top-level home config }; }