Skip to content
/ laptop Public

Latest commit

 

History

1,273 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laptop

Set up a macOS machine as a software development environment.

SSH key

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.

Git

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

Install

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.

macOS apps

Install macOS apps:

Keyboard

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 false

1.1.1.1 as DNS resolver

Set 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"

Binary malware scans

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.

About

Setup script and dotfiles

Resources

Stars

35 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages