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_ed25519
Copy the public key to macOS clipboard:
cat ~/.ssh/id_ed25519.pub | pbcopy
Upload 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 = [email protected]
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 a arm64 (Apple Silicon) chip.
Separate from the script, the following README sections are "one time setup" items.
Install macOS apps:
Configure "System Preferences > Keyboard":
- Set "Key Repeat" to "Fast".
- Set "Delay Until Repeat" to "Short".
- Set "Modifier Keys > Caps Lock Key" to "^ Control".
Set DNS resolver to 1.1.1.1
,
a fast, privacy-focused DNS service from Cloudflare:
- Go to "System Preferences > 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 Preferences > Privacy & Security > Developer Tools"
- Select "Kitty" as the terminal program.