Install Doctor

website·Indexed 32 days ago

https://install.doctor

A set of scripts, software, and configurations designed to quickly set up and provision PCs across multiple operating systems, including macOS, Ubuntu, and Fedora. It provides automated system tweaks, dependency management via Homebrew, and optimized shell configurations for Bash and ZSH, along with integrations for services like Tailscale, Netdata, and Cloudflare.

Tokens
61.9K
Snippets
306
Records
517
Agent score
61%

What's inside Install Doctor

  1. Overview of the Install Doctor provision script

    The provision.sh script is the main entry point for Install Doctor. Its primary purpose is to ensure Homebrew and essential dependencies are installed before cloning the Install Doctor repository and handing over the process to Chezmoi for dotfile application. It utilizes Task for asynchronous performance boosts during the provisioning process.
  2. Overview of Install Doctor provisioning

    Install Doctor is a set of scripts, software, and configurations built on top of Chezmoi designed to automate PC setup. It allows developers to define their desired system state (software and plugins) using YAML or JSON, enabling one-liner provisioning and the ability to reuse settings across different operating systems.
  3. Overview of Gas Station and the transition to Install Doctor

    Gas Station was an early Ansible-based project designed to provision complete workstations via code. Due to the complexity of managing numerous Ansible roles and variables, the project transitioned to a more streamlined approach using Chezmoi and a custom installation script called installx. While Ansible remains useful for large server clusters via SSH, the current architecture favors Chezmoi for dotfile management and shell scripting for single-device software installation.
  4. Supported operating systems for Install Doctor

    Install Doctor is regularly tested and supported on the x86-64 variants of the following operating systems: Arch Linux, CentOS, Debian, Fedora, macOS, Qubes, Ubuntu, and Windows.
  5. Initialize Chezmoi and prompt for software groups

    The initChezmoiAndPrompt function handles the initial user interaction. It displays an introduction using glow, prompts the user to select a SOFTWARE_GROUP using gum (defaulting to 'Full'), and initializes Chezmoi if the configuration file is missing.
    # Checks for chezmoi.yaml at ${XDG_CONFIG_HOME:-$HOME/.config}/chezmoi/chezmoi.yaml
    # If missing, runs: chezmoi init
  6. Use the shared shell profile for Bash and ZSH

    The profile.sh.tmpl script is designed to be included by both ~/.bashrc and ~/.zshrc. It centralizes common imports, environment variables, and settings to ensure consistency across different shells. It handles XDG configuration paths, OS detection for prompt icons, and integrates various third-party tool configurations (like Cargo, emsdk, and McFly).
    # Example of how this script is typically included in .bashrc or .zshrc
    [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile.sh" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile.sh"
  7. Optimize macOS system defaults using macos.sh.tmpl

    The macos.sh.tmpl script applies a curated set of macOS system configurations designed to improve the developer experience and enhance system security. Key operations performed by the script include: requesting administrator privileges, logging commands for auditability, enabling SSH access, and closing open System Preferences panes to ensure configuration changes are not overridden by the UI.
  8. Customize Install Doctor using Chezmoi

    Install Doctor is built on Chezmoi. For advanced customizations beyond the built-in prompt system—such as custom script execution, encryption handlers, or template rendering—you can leverage Chezmoi's features. Key Chezmoi conventions used in the project include files starting with dot_ and files ending in .tmpl for rendering.
  9. Use the Install Doctor provision script to bootstrap a system

    The provision.sh script serves as the main entry point for Install Doctor. It ensures Homebrew and critical dependencies are installed, clones the Install Doctor repository, and hands over the process to Chezmoi for dotfile application. It can be run headlessly using specific environment variables for automated provisioning across different operating systems.
  10. Manage shell environment variables with exports.sh.tmpl

    The exports.sh.tmpl template is used by Install Doctor to define environment variables that are included by ~/.bashrc and ~/.zshrc. This ensures that configurations for languages, fonts, licensing, telemetry, and XDG paths remain consistent and compatible with default Install Doctor settings.