This guide explains how to customize the dev-machine-setup to fit your specific development needs and preferences.
The dev-machine-setup project is designed to be easily customizable without requiring you to modify the core scripts or fork the repository. All customization is done through configuration files and optional custom scripts.
Edit the vars.yaml file for your platform to modify:
- Package lists (add, remove, or change packages)
- System preferences and settings
- Git configuration
- Custom commands to run during setup
Create custom scripts that run after the main setup process for:
- Additional software installation
- Complex configuration tasks
- Integration with company-specific tools
- Personal preference settings
Use the provided examples as starting points:
examples/macOS_vars.yaml- Extended macOS configurationexamples/windows_vars.yaml- Extended Windows configurationexamples/ubuntu_vars.yaml- Extended Ubuntu configurationexamples/debian_vars.yaml- Extended Debian configurationexamples/fedora_vars.yaml- Extended Fedora configurationexamples/*_custom_script.*- Custom script examples
# Homebrew taps (additional package repositories)
homebrew_taps:
- hashicorp/tap # Add Terraform, Vault, etc.
- azure/functions # Add Azure Functions tools
# Command-line tools and libraries
homebrew_formulae:
- git # Version control
- docker # Containerization
- terraform # Infrastructure as code
- kubectl # Kubernetes CLI
# GUI applications
homebrew_casks:
- visual-studio-code # Code editor
- docker-desktop # Docker GUI
- microsoft-teams # Communication
- 1password # Password managercustom_commands_user:
# Show hidden files in Finder
- defaults write com.apple.finder AppleShowAllFiles -bool true
# Disable the warning when changing file extensions
- defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
# Set trackpad tracking speed
- defaults write -g com.apple.trackpad.scaling -float 2.0
custom_commands_elevated:
# Commands that require sudo
- echo "/opt/homebrew/bin/fish" | sudo tee -a /etc/shells# Chocolatey packages (applications and tools)
choco_packages:
- name: git
- name: vscode
- name: docker-desktop
- name: terraform
- name: kubernetes-cli
# PowerShell modules
powershell_modules:
- Az.Accounts
- AWS.Tools.Common
- posh-git
- PSReadLinecustom_commands_user:
# Windows-specific settings
- Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name MouseSpeed -Value 2
- Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name Hidden -Value 1
custom_commands_elevated:
# Commands that require administrator privileges
- Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart# APT packages (system packages and CLI tools, object format)
apt_packages:
- name: git
- name: docker-ce
- name: curl
- name: wget
- name: build-essential
# Snap packages (GUI applications, object format)
snap_packages:
- name: drawio
classic: true
supported_architectures:
- amd64
- name: slack
classic: true
supported_architectures:
- amd64custom_commands_user:
# User-level commands
- gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
- gsettings set org.gnome.desktop.background picture-uri 'file:///path/to/wallpaper.jpg'
custom_commands_elevated:
# Commands that require sudo
- sudo systemctl enable docker
- sudo usermod -aG docker $USER# DNF packages (system packages and CLI tools, object format)
dnf_packages:
- name: git
- name: cmake
- name: curl
- name: wget
- name: golang
# Flatpak packages (GUI applications, currently empty by default)
flatpak_packages: []custom_commands_user:
# User-level commands
- gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
- gsettings set org.gnome.desktop.background picture-uri 'file:///path/to/wallpaper.jpg'
custom_commands_elevated:
# Commands that require sudo
- sudo systemctl enable docker
- sudo usermod -aG docker $USER# APT packages (system packages and CLI tools, object format)
apt_packages:
- name: git
- name: docker-ce
- name: curl
- name: wget
- name: build-essential
# Flatpak packages (GUI applications, object format)
# Debian uses Flatpak instead of Snap
flatpak_packages:
- name: com.jgraph.drawio.desktop
supported_architectures:
- amd64
- name: com.slack.Slack
supported_architectures:
- amd64custom_commands_user:
# User-level commands
- command: gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
description: Set dark theme
- command: gsettings set org.gnome.desktop.background picture-uri 'file:///path/to/wallpaper.jpg'
description: Set wallpaper
custom_commands_elevated:
# Commands that require sudo
- command: systemctl enable docker
description: Enable Docker service
- command: usermod -aG docker $USER
description: Add current user to Docker group- Find the package: Search the appropriate package manager for your desired software
- Determine the category: CLI tool, GUI application, VS Code extension, etc.
- Add to the appropriate list in
vars.yaml:
# Example: Adding a new CLI tool on macOS
homebrew_formulae:
- git
- docker
- your-new-tool # Add this line
# Example: Adding a VS Code extension (same across all platforms)
vscode_extensions:
- github.copilot
- ms-python.python
- your.new-extension # Add this lineCreate different configuration files for different purposes:
# Work environment
cp vars.yaml work_vars.yaml
# Edit work_vars.yaml to include work-specific tools
# Personal environment
cp vars.yaml personal_vars.yaml
# Edit personal_vars.yaml to include personal tools
# Run with specific configuration
./setup.sh personal_vars.yaml- Create a shared configuration:
# team_vars.yaml
git_user_email: "team@company.com"
homebrew_formulae:
- git
- docker
- company-cli-tool
- terraform
vscode_extensions:
- ms-python.python
- hashicorp.terraform
- company.internal-extension- Share via version control:
# Team members can use the shared config
git clone company-repo/dev-setup-configs
./setup.sh -e "user@company.com" team_vars.yaml- Create a custom script:
#!/bin/bash
# custom_company_setup.sh
echo "Installing company-specific tools..."
# Install company VPN client
curl -O https://company.com/vpn-client.pkg
sudo installer -pkg vpn-client.pkg -target /
# Configure company certificates
sudo security add-trusted-cert -d -r trustRoot -k /System/Library/Keychains/SystemRootCertificates.keychain company-root.crt
echo "Company-specific setup complete!"- Reference it in vars.yaml:
custom_script: "./custom_company_setup.sh"# Enhanced Python setup
homebrew_formulae:
- python
- pyenv
- poetry
uv_tools:
- poetry
- ruff
- mypy
- pytest
vscode_extensions:
- ms-python.python
- ms-python.pylance
- ms-python.black-formatter# Web development setup
homebrew_formulae:
- node
- yarn
- nginx
homebrew_casks:
- google-chrome
- firefox
- postman
npm_global_packages:
- '@angular/cli'
- vue-cli
- create-react-app
- eslint
- prettier
vscode_extensions:
- ms-vscode.vscode-typescript-next
- esbenp.prettier-vscode
- bradlc.vscode-tailwindcss# DevOps and cloud development
homebrew_formulae:
- terraform
- kubectl
- helm
- awscli
- azure-cli
- docker
homebrew_casks:
- docker-desktop
- lens
vscode_extensions:
- hashicorp.terraform
- ms-kubernetes-tools.vscode-kubernetes-tools
- ms-azuretools.vscode-dockerUse custom commands to install packages based on conditions:
custom_commands_user:
# Install Rosetta 2 only on Apple Silicon Macs
- |
if [[ $(uname -m) == "arm64" ]]; then
sudo softwareupdate --install-rosetta --agree-to-license
fi# Use environment variables in your setup
custom_commands_user:
- |
if [[ "$WORK_ENV" == "true" ]]; then
brew install company-specific-tool
fiBreak large configurations into smaller, focused files:
# Include other YAML files (requires custom scripting)
# base_vars.yaml - common packages
# work_vars.yaml - work-specific additions
# personal_vars.yaml - personal additionsAdd private or custom package repositories:
# macOS: Custom Homebrew taps
homebrew_taps:
- company/private-tap
# Ubuntu: Custom APT repositories
custom_commands_elevated:
- curl -fsSL https://company.com/gpg | sudo apt-key add -
- echo "deb https://company.com/packages stable main" | sudo tee /etc/apt/sources.list.d/company.list
- sudo apt updateBefore running your customized setup:
- Syntax validation: Ensure YAML files are valid
- Package availability: Verify all packages exist in their repositories
- Permission requirements: Check if custom commands need elevation
- Custom script permissions: Ensure custom scripts are executable
- Use virtual machines: Test configurations in VMs before applying to your main system
- Prerequisites-only mode: Use the
-pflag to test prerequisite installation - Verbose mode: Use
-vor-vvflags to see detailed output during testing - Incremental testing: Add packages gradually rather than all at once
# Validate YAML syntax
python -c "import yaml; yaml.safe_load(open('vars.yaml'))"
# Test package availability (macOS)
brew search your-package-name
# Test package availability (Ubuntu/Debian)
apt search your-package-name
# Test package availability (Fedora)
dnf search your-package-name
# Test custom script syntax
bash -n your_custom_script.sh-
Package not found:
- Check package name spelling
- Verify package exists in the repository
- Check if package requires additional taps/repositories
-
Permission denied:
- Move commands requiring elevation to
custom_commands_elevated - Ensure script has executable permissions (
chmod +x)
- Move commands requiring elevation to
-
Configuration not applied:
- Check YAML syntax and indentation
- Verify custom script path is correct
- Check log files for error messages
- Check the logs: All operations are logged to timestamped files
- Use verbose mode: Add
-vflags for more detailed output - Review examples: Look at the provided example configurations
- Test incrementally: Add customizations gradually to isolate issues
- Version control your configs: Keep your customized
vars.yamlfiles in version control - Document your changes: Add comments explaining why you added specific packages
- Keep backups: Save working configurations before making major changes
- Use meaningful names: Name custom scripts and configs descriptively
- Regular updates: Periodically review and update package lists
- Remove unused packages: Clean up packages you no longer need
- Test after changes: Always test configuration changes before deploying
- Share with team: Consider sharing useful customizations with colleagues
- Verify package sources: Only add packages from trusted repositories
- Review custom scripts: Ensure custom scripts don't contain malicious code
- Minimize elevation: Avoid using
sudounless absolutely necessary - Keep credentials secure: Don't hardcode secrets in configuration files
By following this guide, you can create a personalized development environment that meets your specific needs while maintaining the reliability and automation benefits of the dev-machine-setup project.