Bootstrap script for setting up a new macOS system with:
- Nix + nix-darwin
- Homebrew
- SSH key generation and GitHub authentication
- Homeshick dotfile management
Bootstrap a new machine with a single command:
curl -L https://raw.githubusercontent.com/jrolfs/bootstrap/main/bootstrap.sh | bash- Installs Nix using the Determinate Systems installer
- Clones this repository
- Generates and uploads an SSH key to GitHub (using device flow authentication)
- Installs Homebrew
- Sets up homeshick and clones dotfile repositories
- Builds the system using nix-darwin configuration
- Devbox
# Type check
deno check bootstrap.ts
# Run
nix run .#bootstrapAll configuration is in bootstrap.ts. The script uses GitHub's Device Flow for authentication, which means you don't need to handle any secrets - just follow the prompts during execution to authenticate via GitHub's website.