Skip to content

croaky/laptop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 = [email protected]

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 a 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 Preferences > Keyboard":

  • Set "Key Repeat" to "Fast".
  • Set "Delay Until Repeat" to "Short".
  • Set "Modifier Keys > Caps Lock Key" to "^ Control".

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 Preferences > 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 Preferences > Privacy & Security > Developer Tools"
  • Select "Kitty" as the terminal program.

About

Setup script and dotfiles

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published