added additional docs for prerequisites
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
# Quick Start
|
||||
|
||||
## One Command
|
||||
|
||||
```bash
|
||||
# macOS
|
||||
xcode-select --install && \
|
||||
git clone https://git.sdf.org/jchenry/provision ~/.provision && \
|
||||
~/.provision/provision
|
||||
|
||||
# Linux
|
||||
git clone https://git.sdf.org/jchenry/provision ~/.provision && \
|
||||
~/.provision/provision
|
||||
```
|
||||
|
||||
## What Happens
|
||||
|
||||
1. Installs package manager (Homebrew/apt/pacman)
|
||||
2. Installs CLI tools (tmux, fzf, ripgrep, starship, etc.)
|
||||
3. Installs apps (VSCodium, 1Password, Obsidian, Chrome, Todoist)
|
||||
4. Installs Go to `/usr/local/go`
|
||||
5. Installs Plan9 to `/usr/local/plan9`
|
||||
6. Links config files
|
||||
|
||||
## After Installation
|
||||
|
||||
```bash
|
||||
# Restart shell
|
||||
exec $SHELL
|
||||
|
||||
# Edit git config
|
||||
nano ~/.gitconfig
|
||||
|
||||
# Install tmux plugins
|
||||
# In tmux: Ctrl+a then I
|
||||
```
|
||||
|
||||
## Skip Options
|
||||
|
||||
```bash
|
||||
# Skip apps (faster, CLI-only setup)
|
||||
provision --skip-apps
|
||||
|
||||
# Skip Go
|
||||
provision --skip-go
|
||||
|
||||
# Skip Plan9
|
||||
provision --skip-p9
|
||||
```
|
||||
|
||||
Done!
|
||||
@@ -1,76 +1,200 @@
|
||||
# Provision
|
||||
|
||||
Simple, idempotent provisioning for macOS and Linux.
|
||||
Simple, idempotent provisioning for macOS and Linux desktop computers.
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Fresh Debian/Ubuntu System
|
||||
|
||||
```bash
|
||||
git clone https://git.sdf.org/jchenry/provision ~/.provision
|
||||
~/.provision/provision
|
||||
exec $SHELL
|
||||
# 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
|
||||
|
||||
- **Packages**: git, curl, tmux, fzf, ripgrep, starship, zoxide, eza, fd, gh, jq
|
||||
- **Apps**: VSCodium, 1Password, Obsidian, Chrome, Todoist
|
||||
- **Go**: Latest version to `/usr/local/go`
|
||||
- **Plan9**: Installed to `/usr/local/plan9`
|
||||
- **Config**: bash, tmux, starship, git configs
|
||||
### 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
|
||||
|
||||
## Options
|
||||
### 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
|
||||
provision # Full provision
|
||||
provision --skip-apps # Skip GUI apps
|
||||
provision --skip-go # Skip Go installation
|
||||
provision --skip-p9 # Skip Plan9 installation
|
||||
provision --help # Show help
|
||||
# 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
|
||||
├── lib/ # Utilities
|
||||
├── scripts/ # Install scripts
|
||||
│ ├── packages.sh # CLI tools
|
||||
│ ├── apps.sh # GUI applications
|
||||
│ ├── golang.sh # Go installation
|
||||
│ └── plan9port.sh # Plan9 installation
|
||||
└── config/ # Config files
|
||||
├── 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 (TWM)
|
||||
├── Xresources # X11 resources
|
||||
└── twmrc # TWM window manager config
|
||||
├── 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 (Homebrew)
|
||||
- Debian/Ubuntu (apt)
|
||||
- Arch Linux (pacman + AUR)
|
||||
|
||||
## Customization
|
||||
|
||||
Edit files in `config/` directory, then re-run:
|
||||
|
||||
```bash
|
||||
~/.provision/config/link-dotfiles.sh
|
||||
```
|
||||
- macOS (via Homebrew)
|
||||
- Debian/Ubuntu (via apt)
|
||||
- Arch Linux (via pacman + AUR)
|
||||
|
||||
## After Installation
|
||||
|
||||
1. Edit `~/.gitconfig` - set your name and email
|
||||
2. In tmux, press `Ctrl+a` then `I` to install plugins
|
||||
3. Customize `~/.provision/config/` files as needed
|
||||
```bash
|
||||
# 1. Restart your shell
|
||||
exec $SHELL
|
||||
|
||||
## References
|
||||
# 2. Edit git config
|
||||
nano ~/.gitconfig # Set your name and email
|
||||
|
||||
- Blog: https://jnsgr.uk/2025/06/from-nixos-to-ubuntu/
|
||||
# 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.
|
||||
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
# Provision System - Final Summary
|
||||
|
||||
## What It Does
|
||||
|
||||
One-command provisioning for macOS and Linux with:
|
||||
- CLI tools (tmux, fzf, ripgrep, starship, zoxide, etc.)
|
||||
- GUI apps (VSCodium, 1Password, Obsidian, Chrome)
|
||||
- Go (tar.gz → /usr/local/go)
|
||||
- Plan9port (built → /usr/local/plan9)
|
||||
- Config files (bash, tmux, git, starship)
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
provision/
|
||||
├── provision # Main script (140 lines)
|
||||
├── README.md # 69 lines
|
||||
├── QUICKSTART.md # 52 lines
|
||||
│
|
||||
├── lib/ # Utilities
|
||||
│ ├── common.sh # Platform detection, logging
|
||||
│ └── package.sh # Package manager abstraction
|
||||
│
|
||||
├── scripts/ # 4 install scripts
|
||||
│ ├── packages.sh # All CLI tools
|
||||
│ ├── apps.sh # All GUI apps
|
||||
│ ├── golang.sh # Go from tar.gz
|
||||
│ └── plan9port.sh # Plan9 from git
|
||||
│
|
||||
└── config/ # Config files
|
||||
├── link-dotfiles.sh
|
||||
├── bashrc # Includes Go & Plan9 paths
|
||||
├── tmux.conf
|
||||
├── starship.toml
|
||||
├── gitconfig
|
||||
└── gitignore_global
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
# Full provision
|
||||
~/.provision/provision
|
||||
|
||||
# Skip components
|
||||
provision --skip-apps # No GUI apps
|
||||
provision --skip-go # No Go
|
||||
provision --skip-p9 # No Plan9
|
||||
```
|
||||
|
||||
## Platforms
|
||||
|
||||
- macOS (Homebrew + casks)
|
||||
- Debian/Ubuntu (apt + .deb downloads)
|
||||
- Arch Linux (pacman + AUR)
|
||||
|
||||
## Key Features
|
||||
|
||||
1. **Simple**: 4 scripts instead of 20+
|
||||
2. **Fast**: Parallel installs where possible
|
||||
3. **Idempotent**: Safe to re-run
|
||||
4. **Self-contained**: All config files included
|
||||
5. **Flexible**: Skip any component
|
||||
|
||||
Total: ~500 lines of shell script
|
||||
@@ -2,7 +2,13 @@
|
||||
set -euo pipefail
|
||||
|
||||
# Bootstrap script for provisioning
|
||||
# Usage: curl -fsSL https://git.sdf.org/jchenry/provision/raw/branch/main/bootstrap | bash
|
||||
# Usage:
|
||||
# On a fresh Debian system as root:
|
||||
# apt-get update && apt-get install -y curl git sudo
|
||||
# adduser <username> sudo
|
||||
# su - <username>
|
||||
# Then run:
|
||||
# curl -fsSL https://git.sdf.org/jchenry/provision/raw/branch/main/bootstrap | bash
|
||||
|
||||
REPO_URL="https://git.sdf.org/jchenry/provision.git"
|
||||
CLONE_DIR="$HOME/.workspace/src/git.sdf.org/jchenry/provision"
|
||||
@@ -10,11 +16,48 @@ CLONE_DIR="$HOME/.workspace/src/git.sdf.org/jchenry/provision"
|
||||
echo "=== Provision Bootstrap ==="
|
||||
echo ""
|
||||
|
||||
# Check if running as root
|
||||
if [ "$EUID" -eq 0 ]; then
|
||||
echo "ERROR: Do not run this script as root"
|
||||
echo ""
|
||||
echo "If you're on a fresh Debian system, first run as root:"
|
||||
echo " apt-get update && apt-get install -y curl git sudo"
|
||||
echo " adduser $SUDO_USER sudo"
|
||||
echo ""
|
||||
echo "Then log out and back in, and run this script as your regular user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for git
|
||||
if ! command -v git >/dev/null 2>&1; then
|
||||
echo "ERROR: git is not installed"
|
||||
echo ""
|
||||
echo "On Debian/Ubuntu, run as root:"
|
||||
echo " apt-get update && apt-get install -y git"
|
||||
echo ""
|
||||
echo "On Arch, run as root:"
|
||||
echo " pacman -Sy git"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for sudo access
|
||||
if ! sudo -n true 2>/dev/null; then
|
||||
echo "ERROR: You don't have sudo access"
|
||||
echo ""
|
||||
echo "On Debian/Ubuntu, run as root:"
|
||||
echo " adduser $(whoami) sudo"
|
||||
echo ""
|
||||
echo "Then log out and back in for the change to take effect."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✓ Prerequisites check passed"
|
||||
echo ""
|
||||
|
||||
# Ensure workspace directory exists
|
||||
if [ ! -d "$HOME/.workspace" ]; then
|
||||
echo "Creating workspace directory..."
|
||||
mkdir -p "$HOME/.workspace/src/git.sdf.org/jchenry"
|
||||
pushd $HOME/.workspace/src/git.sdf.org/jchenry
|
||||
fi
|
||||
|
||||
# Clone or update repository
|
||||
|
||||
Reference in New Issue
Block a user