feat: add package and machine profile configuration
- Add packages.yaml defining system packages across platforms - Add machine-profiles.yaml for different deployment scenarios - Support for server, workstation, and development profiles 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
172
machine-profiles.yaml
Normal file
172
machine-profiles.yaml
Normal file
@@ -0,0 +1,172 @@
|
||||
# Machine Profile Configuration
|
||||
# Define different package sets for different machine types
|
||||
|
||||
# Profile definitions
|
||||
profiles:
|
||||
# Minimal server profile - essential tools only
|
||||
server:
|
||||
description: "Minimal server setup with essential tools"
|
||||
packages:
|
||||
system_packages:
|
||||
- curl
|
||||
- git
|
||||
- vim
|
||||
- sshuttle
|
||||
github_packages:
|
||||
- ripgrep # Essential for log searching
|
||||
- fd # Better find for system admin
|
||||
optional_packages: [] # No optional packages on servers
|
||||
|
||||
# Development machine profile - full setup
|
||||
dev:
|
||||
description: "Full development machine setup"
|
||||
packages:
|
||||
system_packages:
|
||||
- curl
|
||||
- git
|
||||
- vim
|
||||
- sshuttle
|
||||
- docker
|
||||
- docker-compose
|
||||
binary_packages:
|
||||
- claude-code
|
||||
- gemini-cli
|
||||
github_packages:
|
||||
- fzf
|
||||
- bat
|
||||
- ripgrep
|
||||
- fd
|
||||
- delta
|
||||
npm_packages:
|
||||
- pm2
|
||||
python_packages:
|
||||
- requests
|
||||
zsh_plugins:
|
||||
- zsh-syntax-highlighting
|
||||
- zsh-autosuggestions
|
||||
optional_packages:
|
||||
- docker
|
||||
- docker-compose
|
||||
|
||||
# Lightweight development - dev tools without heavy packages
|
||||
dev-lite:
|
||||
description: "Development setup without heavy packages (Docker, etc.)"
|
||||
packages:
|
||||
system_packages:
|
||||
- curl
|
||||
- git
|
||||
- vim
|
||||
- sshuttle
|
||||
binary_packages:
|
||||
- claude-code
|
||||
- gemini-cli
|
||||
github_packages:
|
||||
- fzf
|
||||
- bat
|
||||
- ripgrep
|
||||
- fd
|
||||
- delta
|
||||
npm_packages: []
|
||||
python_packages:
|
||||
- requests
|
||||
zsh_plugins:
|
||||
- zsh-syntax-highlighting
|
||||
- zsh-autosuggestions
|
||||
optional_packages: []
|
||||
|
||||
# Personal laptop/desktop
|
||||
personal:
|
||||
description: "Personal machine with all tools and conveniences"
|
||||
packages:
|
||||
system_packages:
|
||||
- curl
|
||||
- git
|
||||
- vim
|
||||
- sshuttle
|
||||
- docker
|
||||
- docker-compose
|
||||
binary_packages:
|
||||
- claude-code
|
||||
- gemini-cli
|
||||
- task-master
|
||||
github_packages:
|
||||
- fzf
|
||||
- bat
|
||||
- ripgrep
|
||||
- fd
|
||||
- delta
|
||||
npm_packages:
|
||||
- pm2
|
||||
python_packages:
|
||||
- requests
|
||||
zsh_plugins:
|
||||
- zsh-syntax-highlighting
|
||||
- zsh-autosuggestions
|
||||
optional_packages:
|
||||
- docker
|
||||
- docker-compose
|
||||
|
||||
# Minimal profile - bare bones
|
||||
minimal:
|
||||
description: "Absolute minimum setup"
|
||||
packages:
|
||||
system_packages:
|
||||
- curl
|
||||
- git
|
||||
- vim
|
||||
binary_packages: []
|
||||
github_packages: []
|
||||
npm_packages: []
|
||||
python_packages: []
|
||||
zsh_plugins: []
|
||||
optional_packages: []
|
||||
|
||||
# Profile detection rules (auto-detection logic)
|
||||
detection_rules:
|
||||
# Check for server indicators
|
||||
server:
|
||||
- command: "systemctl is-active sshd"
|
||||
condition: "active"
|
||||
weight: 30
|
||||
- command: "test -f /etc/systemd/system/multi-user.target"
|
||||
condition: "exists"
|
||||
weight: 20
|
||||
- command: "who | wc -l"
|
||||
condition: "== 0" # No logged in users
|
||||
weight: 10
|
||||
- environment: "SSH_CONNECTION"
|
||||
condition: "set"
|
||||
weight: 25
|
||||
|
||||
# Check for development indicators
|
||||
dev:
|
||||
- command: "which code || which vim || which nvim"
|
||||
condition: "exists"
|
||||
weight: 25
|
||||
- command: "test -d ~/projects || test -d ~/dev || test -d ~/src"
|
||||
condition: "exists"
|
||||
weight: 20
|
||||
- command: "which node || which python3 || which docker"
|
||||
condition: "exists"
|
||||
weight: 30
|
||||
- environment: "DISPLAY"
|
||||
condition: "set"
|
||||
weight: 15
|
||||
|
||||
# Check for personal machine indicators
|
||||
personal:
|
||||
- command: "test -d ~/Desktop || test -d ~/Documents"
|
||||
condition: "exists"
|
||||
weight: 20
|
||||
- command: "which firefox || which chrome || which safari"
|
||||
condition: "exists"
|
||||
weight: 25
|
||||
- environment: "HOME"
|
||||
condition: "contains /Users/ || contains /home/eric"
|
||||
weight: 15
|
||||
|
||||
# Default fallbacks
|
||||
defaults:
|
||||
profile: "dev-lite" # Safe default
|
||||
auto_detect: true
|
||||
prompt_user: true # Ask user to confirm auto-detected profile
|
||||
191
packages.yaml
Normal file
191
packages.yaml
Normal file
@@ -0,0 +1,191 @@
|
||||
# Dotfiles Package Configuration
|
||||
# Define packages to be installed across all systems
|
||||
|
||||
# System packages (apt/yum/brew)
|
||||
system_packages:
|
||||
- name: sshuttle
|
||||
description: "VPN over SSH"
|
||||
check_command: "which sshuttle"
|
||||
install_commands:
|
||||
debian: "sudo apt update && sudo apt install -y sshuttle"
|
||||
ubuntu: "sudo apt update && sudo apt install -y sshuttle"
|
||||
fedora: "sudo dnf install -y sshuttle"
|
||||
centos: "sudo yum install -y sshuttle"
|
||||
rhel: "sudo yum install -y sshuttle"
|
||||
macos: "brew install sshuttle"
|
||||
|
||||
- name: curl
|
||||
description: "Command line tool for transferring data"
|
||||
check_command: "which curl"
|
||||
install_commands:
|
||||
debian: "sudo apt update && sudo apt install -y curl"
|
||||
ubuntu: "sudo apt update && sudo apt install -y curl"
|
||||
fedora: "sudo dnf install -y curl"
|
||||
centos: "sudo yum install -y curl"
|
||||
rhel: "sudo yum install -y curl"
|
||||
macos: "brew install curl"
|
||||
|
||||
- name: git
|
||||
description: "Version control system"
|
||||
check_command: "which git"
|
||||
install_commands:
|
||||
debian: "sudo apt update && sudo apt install -y git"
|
||||
ubuntu: "sudo apt update && sudo apt install -y git"
|
||||
fedora: "sudo dnf install -y git"
|
||||
centos: "sudo yum install -y git"
|
||||
rhel: "sudo yum install -y git"
|
||||
macos: "brew install git"
|
||||
|
||||
- name: vim
|
||||
description: "Text editor"
|
||||
check_command: "which vim"
|
||||
install_commands:
|
||||
debian: "sudo apt update && sudo apt install -y vim"
|
||||
ubuntu: "sudo apt update && sudo apt install -y vim"
|
||||
fedora: "sudo dnf install -y vim"
|
||||
centos: "sudo yum install -y vim"
|
||||
rhel: "sudo yum install -y vim"
|
||||
macos: "brew install vim"
|
||||
|
||||
# Binary downloads and installs
|
||||
binary_packages:
|
||||
- name: claude-code
|
||||
description: "Claude Code CLI"
|
||||
check_command: "which claude"
|
||||
install_type: "npm"
|
||||
npm_package: "@anthropic-ai/claude-code"
|
||||
fallback_install: |
|
||||
echo "Trying alternative binary installation..."
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]] || [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
curl -fsSL https://claude.ai/install.sh | bash
|
||||
else
|
||||
echo "Unsupported OS for Claude Code CLI"
|
||||
return 1
|
||||
fi
|
||||
|
||||
- name: gemini-cli
|
||||
description: "Google Gemini CLI"
|
||||
check_command: "which gemini"
|
||||
install_type: "npm"
|
||||
npm_package: "@google/gemini-cli"
|
||||
homebrew_package: "gemini-cli"
|
||||
npx_fallback: "https://github.com/google-gemini/gemini-cli"
|
||||
|
||||
- name: task-master
|
||||
description: "Task management tool"
|
||||
check_command: "which task-master"
|
||||
install_type: "github"
|
||||
github_repo: "your-username/task-master" # Replace with actual repo
|
||||
github_install_method: "release" # or "build"
|
||||
install_path: "$HOME/.local/bin"
|
||||
|
||||
# GitHub repository installations
|
||||
github_packages:
|
||||
- name: fzf
|
||||
description: "Command-line fuzzy finder"
|
||||
check_command: "which fzf"
|
||||
github_repo: "junegunn/fzf"
|
||||
install_method: "clone_and_install"
|
||||
install_path: "$HOME/.fzf"
|
||||
post_install: "$HOME/.fzf/install --all"
|
||||
|
||||
- name: exa
|
||||
description: "Modern replacement for ls"
|
||||
check_command: "which exa"
|
||||
github_repo: "ogham/exa"
|
||||
install_method: "release_binary"
|
||||
install_path: "$HOME/.local/bin"
|
||||
binary_name: "exa"
|
||||
asset_pattern: "linux-x86_64" # or "macos-x86_64" for macOS
|
||||
|
||||
- name: bat
|
||||
description: "A cat clone with syntax highlighting"
|
||||
check_command: "which bat"
|
||||
github_repo: "sharkdp/bat"
|
||||
install_method: "release_binary"
|
||||
install_path: "$HOME/.local/bin"
|
||||
binary_name: "bat"
|
||||
asset_pattern: "x86_64-unknown-linux-gnu" # or "x86_64-apple-darwin" for macOS
|
||||
|
||||
- name: ripgrep
|
||||
description: "Fast text search tool"
|
||||
check_command: "which rg"
|
||||
github_repo: "BurntSushi/ripgrep"
|
||||
install_method: "release_binary"
|
||||
install_path: "$HOME/.local/bin"
|
||||
binary_name: "rg"
|
||||
asset_pattern: "x86_64-unknown-linux-gnu"
|
||||
|
||||
- name: fd
|
||||
description: "Fast alternative to find"
|
||||
check_command: "which fd"
|
||||
github_repo: "sharkdp/fd"
|
||||
install_method: "release_binary"
|
||||
install_path: "$HOME/.local/bin"
|
||||
binary_name: "fd"
|
||||
asset_pattern: "x86_64-unknown-linux-gnu"
|
||||
|
||||
- name: delta
|
||||
description: "Syntax-highlighting pager for git"
|
||||
check_command: "which delta"
|
||||
github_repo: "dandavison/delta"
|
||||
install_method: "release_binary"
|
||||
install_path: "$HOME/.local/bin"
|
||||
binary_name: "delta"
|
||||
asset_pattern: "x86_64-unknown-linux-gnu"
|
||||
|
||||
# Python packages (pip)
|
||||
python_packages:
|
||||
- name: requests
|
||||
description: "Python HTTP library"
|
||||
check_command: "python3 -c 'import requests' 2>/dev/null"
|
||||
install_command: "pip3 install requests"
|
||||
|
||||
# Node.js packages (npm)
|
||||
npm_packages:
|
||||
- name: pm2
|
||||
description: "Process manager for Node.js"
|
||||
check_command: "which pm2"
|
||||
install_command: "npm install -g pm2"
|
||||
|
||||
# Oh My Zsh plugins (only for zsh users)
|
||||
zsh_plugins:
|
||||
- name: zsh-syntax-highlighting
|
||||
description: "Syntax highlighting for zsh"
|
||||
check_path: "$HOME/.oh-my-zsh/plugins/zsh-syntax-highlighting"
|
||||
install_script: |
|
||||
if [[ -d "$HOME/.oh-my-zsh" ]]; then
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||
fi
|
||||
|
||||
- name: zsh-autosuggestions
|
||||
description: "Auto suggestions for zsh"
|
||||
check_path: "$HOME/.oh-my-zsh/plugins/zsh-autosuggestions"
|
||||
install_script: |
|
||||
if [[ -d "$HOME/.oh-my-zsh" ]]; then
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||
fi
|
||||
|
||||
# Optional packages (won't fail installation if they can't be installed)
|
||||
optional_packages:
|
||||
- name: docker
|
||||
description: "Container platform"
|
||||
check_command: "which docker"
|
||||
install_commands:
|
||||
debian: "curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh"
|
||||
ubuntu: "curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh"
|
||||
fedora: "sudo dnf install -y docker"
|
||||
centos: "sudo yum install -y docker"
|
||||
rhel: "sudo yum install -y docker"
|
||||
macos: "brew install --cask docker"
|
||||
|
||||
- name: docker-compose
|
||||
description: "Multi-container Docker applications"
|
||||
check_command: "which docker-compose"
|
||||
install_commands:
|
||||
debian: "sudo apt update && sudo apt install -y docker-compose"
|
||||
ubuntu: "sudo apt update && sudo apt install -y docker-compose"
|
||||
fedora: "sudo dnf install -y docker-compose"
|
||||
centos: "sudo yum install -y docker-compose"
|
||||
rhel: "sudo yum install -y docker-compose"
|
||||
macos: "brew install docker-compose"
|
||||
Reference in New Issue
Block a user