# Provision Simple, idempotent provisioning for macOS and Linux desktop computers. ## Quick Start ### Fresh Debian/Ubuntu System ```bash # As root apt-get update && apt-get install -y curl git sudo adduser yourusername sudo # Log out and back in, then as regular user: curl -fsSL https://git.sdf.org/jchenry/provision/raw/branch/main/bootstrap | bash ``` ### macOS or Existing Linux System ```bash # macOS (install Xcode CLI tools first) xcode-select --install # Clone and run git clone https://git.sdf.org/jchenry/provision.git ~/.workspace/src/git.sdf.org/jchenry/provision cd ~/.workspace/src/git.sdf.org/jchenry/provision ./provision ``` Or use the bootstrap script: ```bash curl -fsSL https://git.sdf.org/jchenry/provision/raw/branch/main/bootstrap | bash ``` ## What Gets Installed ### CLI Tools - **Essentials**: git, curl, wget, tmux, jq - **Modern tools**: fzf, ripgrep, starship, zoxide, eza, fd, gh - **X11 utilities** (Linux only): twm, slock, xsetroot, feh, xclock, xload, xdm ### GUI Applications - VSCodium (with extensions) - 1Password - Obsidian - Google Chrome - Todoist ### Development - **Go**: Latest version installed to `/usr/local/go` - **Plan9port**: Built from source to `/usr/local/plan9` ### Configuration Files - Bash (with Go & Plan9 paths) - Tmux (with plugin manager) - Starship prompt - Git (with global gitignore) - X11/TWM window manager (Linux only) - Dracula color scheme - 1.5x DPI scaling - Custom XDM login screen ## Usage ```bash # Full provision ./provision # Skip components ./provision --skip-apps # Skip GUI applications ./provision --skip-go # Skip Go installation ./provision --skip-p9 # Skip Plan9 installation ./provision --help # Show help ``` ## Structure ``` provision/ ├── provision # Main script ├── bootstrap # Bootstrap script for fresh systems ├── lib/ # Utilities │ ├── common.sh # Platform detection, logging │ └── package.sh # Package manager abstraction ├── scripts/ # Installation scripts │ ├── packages.sh # CLI tools │ ├── apps.sh # GUI applications │ ├── golang.sh # Go from tar.gz │ ├── plan9port.sh # Plan9 from source │ ├── user-setup.sh # User account setup │ └── update-xdm.sh # Update XDM configuration └── config/ # Configuration files ├── link-dotfiles.sh ├── bashrc ├── tmux.conf ├── starship.toml ├── gitconfig ├── gitignore_global ├── vscode-extensions.txt ├── xinitrc # X11 init with TWM ├── xsession # XDM session ├── Xresources # X11 resources (Dracula theme, DPI) ├── twmrc # TWM window manager config └── xdm/ # XDM customizations ├── Xresources # Login screen appearance ├── Xsetup # Pre-login setup └── Xstartup # Post-login setup ``` ## Supported Platforms - macOS (via Homebrew) - Debian/Ubuntu/elementaryOS (via apt) - Arch Linux (via pacman + AUR) ## After Installation ```bash # 1. Restart your shell exec $SHELL # 2. Edit git config nano ~/.gitconfig # Set your name and email # 3. Install tmux plugins # In tmux, press: Ctrl+a then I # 4. (Optional) Enable XDM on Linux sudo systemctl enable --now xdm ``` ## X11/TWM Configuration (Linux) The provision system sets up a complete X11 environment with TWM: - **Display Manager**: XDM with Dracula-themed login screen - **Window Manager**: TWM with custom configuration - **DPI Scaling**: 1.5x by default (configurable in xinitrc/xsession/Xresources) - **Color Scheme**: Dracula palette throughout - **Applications**: Menu-based launcher in TWM ### Adjusting DPI Scaling Edit `config/Xresources`, `config/xinitrc`, and `config/xsession` to change scaling: - `96` = 1x (standard) - `144` = 1.5x (default) - `192` = 2x ### Updating XDM Configuration After modifying XDM files in `config/xdm/`: ```bash ./scripts/update-xdm.sh sudo systemctl restart xdm ``` ## Customization All configuration files are in `config/`. After editing, re-link: ```bash ./config/link-dotfiles.sh ``` ## Fresh Debian Installation For a brand new Debian system where you don't have sudo access: ```bash # 1. As root, install prerequisites and add user to sudo su - apt-get update && apt-get install -y curl git sudo adduser yourusername sudo exit # 2. Log out and log back in (important!) # 3. As regular user, run bootstrap curl -fsSL https://git.sdf.org/jchenry/provision/raw/branch/main/bootstrap | bash ``` The bootstrap script will: - Check prerequisites (git, sudo access) - Clone the repository - Run the provision script - Provide helpful error messages if anything is missing ## Philosophy Based on the "JFUI" (Just Use It) approach from [this blog post](https://jnsgr.uk/2025/06/from-nixos-to-ubuntu/): - **Simple**: 4 main scripts instead of 20+ - **Fast**: Parallel installs where possible - **Idempotent**: Safe to re-run anytime - **Self-contained**: All config files included, no external dotfiles repo - **Flexible**: Skip any component with flags Total: ~600 lines of shell script.