Set up a macOS machine as a software development environment.
Ed25519 uses elliptic curve cryptography with good security and performance.
Create the key:
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -C "$(whoami)@$(hostname)"Start the SSH agent:
eval "$(ssh-agent -s)"Add the private key to the SSH agent on macOS:
ssh-add --apple-use-keychain ~/.ssh/id_ed25519Copy the public key to macOS clipboard:
cat ~/.ssh/id_ed25519.pub | pbcopyUpload the public key to GitHub.
Set your Git and GitHub user in ~/.gitconfig.local
to keep it out of version control:
[github]
user = yourgithubusername
[user]
name = Your Name
email = you@example.com
Clone onto laptop:
export LAPTOP="$HOME/laptop"
git clone https://github.com/croaky/laptop.git $LAPTOP
cd $LAPTOP
Review:
less laptop.sh
Run:
./laptop.sh
The script can safely be run multiple times. It is tested on the latest version of macOS on an arm64 (Apple Silicon) chip.
Separate from the script, the following README sections are "one time setup" items.
Install macOS apps:
Configure "System Settings > Keyboard":
- Set "Key Repeat" to "Fast".
- Set "Delay Until Repeat" to "Short".
- Set "Modifier Keys > Caps Lock Key" to "^ Control".
Disable "Press and Hold" accent menu to allow key repeat for all keys:
defaults write -g ApplePressAndHoldEnabled -bool falseSet DNS resolver to 1.1.1.1,
a fast, privacy-focused DNS service from Cloudflare:
- Go to "System Settings > Network > Advanced... > DNS"
- Click "+"
- Enter "1.1.1.1"
- Click "OK"
- Click "Apply"
A macOS feature that scans new binaries for malware adds an extra ~2s on to every build of Go programs, disturbing its fast iteration cycle. Disable it by running:
sudo spctl developer-mode enable-terminal
Then:
- Go to "System Settings > Privacy & Security > Developer Tools"
- Select "Warp" as the terminal program.