This directory contains Ansible automation scripts to set up a consistent development environment on Debian. The automation installs and configures common development tools, applications, and settings to create a ready-to-use development environment.
- APT Package Management: Installs essential development tools and applications
- Flatpak Package Management: Installs GUI applications via Flatpak
- Python Setup: Bootstraps uv via pipx and installs Python CLI tools via uv
- Node.js Setup: Installs npm global packages
- VS Code Extensions: Configures VS Code with essential development extensions
- Git Setup: Configures Git with user information, Git LFS, and Git Credential Manager
- AppImage Support: Installs applications via AppImage with desktop integration
- Custom Script Support: Allows for additional customization via custom scripts
- Debian 13 (Trixie) or later
- Internet connection
- Administrator (sudo) privileges
This setup has been tested and confirmed to work on:
- Debian 13 (Trixie)
- WSL Debian
-
Get the script:
# Clone the repository if you haven't already git clone https://github.com/ryanspletzer/dev-machine-setup.git cd dev-machine-setup/debian # Allow the setup.sh script to run chmod +x ./setup.sh
-
Run the setup script:
# Run the script ./setup.sh -e "your.email@example.com"
The setup.sh script accepts several options:
Usage: ./setup.sh [-v] [-e git_email] [-n git_name] [-p] [-c] [playbook_file]
-v Enable verbose output (can be repeated for more verbosity, e.g. -vv or -vvv)
-e git_email Specify Git user email
-n git_name Specify Git user name
-p Install prerequisites only (Ansible), don't run Ansible playbook
-c CI mode: skip interactive sudo prompts (assumes passwordless sudo)
playbook_file Optional playbook file name (defaults to setup.yaml)-
Basic installation with Git email:
./setup.sh -e "your.email@example.com" -
Install with verbose output and custom Git name:
./setup.sh -v -e "your.email@example.com" -n "Your Name"
-
Install prerequisites only (Ansible):
./setup.sh -p
-
Use a custom playbook file:
./setup.sh custom_setup.yaml
Edit vars.yaml to customize which packages get installed:
# Command-line tools and libraries via APT (object format)
apt_packages:
- name: git
- name: curl
- name: cmake
- name: golang-go
- name: code
# GUI applications via Flatpak (currently empty by default)
flatpak_packages: []# PowerShell modules
powershell_modules:
- AWS.Tools.Common
- Terminal-Icons
# Bootstrap uv via pipx
pipx_packages:
- uv
# Python CLI tools via uv
uv_tools:
- poetry
- ruff
# VS Code extensions
vscode_extensions:
- ms-vscode.powershell
- github.copilotIf you're running in WSL,
set is_wsl: true in vars.yaml to enable WSL-specific configurations.
You can add custom commands to be executed during setup
by adding entries to custom_commands_user and custom_commands_elevated in vars.yaml.
To add additional setup steps:
- Create a custom script in the
examples/directory or elsewhere - Set the
custom_scriptvariable invars.yamlto point to your script - Make sure the script is executable (
chmod +x your_script.sh)
setup.sh: Main setup script that installs prerequisites and runs the Ansible playbooksetup.yaml: Ansible playbook that performs the installation and configurationvars.yaml: Configuration variables defining what gets installedexamples/: Directory containing example custom scripts
For comprehensive documentation and examples:
- Complete Documentation - Full project documentation
- Design Principles - Understanding the philosophy
- Troubleshooting Guide - Common issues and solutions
- Architecture Overview - How all the pieces fit together
- Package Management Strategy - Our approach to managing packages
The default setup includes a curated selection of popular development tools and applications:
- Git and Git LFS
- Visual Studio Code
- Go
- Visual Studio Code
- Flatpak applications (configurable)
See vars.yaml for the complete list of installed packages.
The playbook uses tags to allow selective execution of tasks:
system: System-level tasksarchitecture: Architecture detectionwsl: WSL-specific configuration
apt: All APT-related tasksupdate: Only update APT cacheupgrade: Only upgrade packagespackages: Only install packagesprereqs: Only prerequisite packagesrepositories: Only add repositories
flatpak: Flatpak package installationappimage: AppImage package installationpowershell: PowerShell installation and module setuppipx: Python package installation via pipx (bootstraps uv)uv: Python CLI tool installation via uvnpm: Node.js package installationdotnet: .NET SDK and tools installationvscode: VS Code extension installationcursor: Cursor extension installationgit: Git configuration taskscustom: Custom commands and script executionuser-commands: User-level commandselevated-commands: Commands requiring sudo
You can run the playbook with specific tags using the -t option:
ansible-playbook -t apt,git setup.yaml- Logs: All installation logs are saved to a timestamped log file in the current directory.
- Verbosity: Use the
-vflag (can be repeated for more detail) to see more information during setup. - Failed Tasks: You can safely rerun the setup script - it will skip already completed tasks.
- Dependencies: If you encounter errors about missing dependencies,
try running with the
-pflag first to install prerequisites, then run the script again normally.
- The setup script securely handles your sudo password.
- All sudo operations are performed via Ansible which is safer than multiple direct sudo calls.
- The script only runs commands defined in the Ansible playbook or in your custom commands / custom script.
If you're using WSL (Windows Subsystem for Linux), make sure to:
- Set
is_wsl: trueinvars.yaml - Consider whether you need all the GUI applications since WSL is primarily a terminal environment
- Some features like Docker might be better installed on the Windows host when using WSL 2