Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/briangershon/setup-mac

My personal configuration for MacOS machines.
https://github.com/briangershon/setup-mac

bash dotfiles homebrew macos tmux-conf

Last synced: 3 days ago
JSON representation

My personal configuration for MacOS machines.

Awesome Lists containing this project

README

        

# setup-mac

My personal configuration for MacOS machines.

## Setup MacOS Machine

Update Computer name via `System Preferences > Sharing`.

Install Desktop apps:

- Install 1Password.
- Install Brave Browser. Setup various profiles.
- Dropbox
- Discord

In Mac App Store, install:

- Slack

## Setup Developer Tools

Install iTerm2.

Install Docker Desktop.

- for Apple Silicon (M1) machines you may need one of these when working with non-ARM containers:
- `export DOCKER_DEFAULT_PLATFORM=linux/amd64` to build containers on AMD/64 instead of default ARM/64.
- `softwareupdate --install-rosetta` to run Intel containers

Switch macOS shell to bash: Open Terminal and then run `chsh -s /bin/bash` then restart Terminal.

Install Microsoft Visual Code extensions:

- `command-shift-p` and run `Shell Command: Install 'code' command in PATH`

- `Prettier - Code formatter` by Prettier

- update Settings for `Editor: Default Formatter` to `Prettier - Code formatter`.

- `Dev Containers` by Microsoft

- `Solidity` by Nomic Foundation

- `Tailwind CSS` by Tailwind Labs

- `GitHub Codespaces` by GitHub

- `Docker` by Microsoft

Setup Passwordless Auth to Github via SSH

ssh-keygen -t ed25519 -C ""

# legacy version
ssh-keygen -t rsa -b 4096 -C ""

# add public key to Github

For nice visual Git diffs, there are many options:

- Use VSCode's tools
- Install `difftastic`, a Rust-based diff tool installed via Homebrew below. Run as `difft`.
- Install Github Desktop and the command line tool so you can run `github .` in any repository.

Install Homebrew

xcode-select --install

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

If homebrew needs to be accessible for multiple user accounts on same machine:

Install apps via Homebrew:

brew install tmux git bash-completion gh difftastic gpg git-lfs yarn

Install `nvm` to install NodeJS:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

... and install latest version:

nvm ls-remote
nvm install v18
nvm alias default v18

Install Go: https://github.com/briangershon/setup-go

## Clone setup-mac and link up config files

Clone this repo locally via `git clone [email protected]:briangershon/setup-mac.git`

Setup .dot config files

# if files already exist merge/remove before linking

cd ~
ln -s ~/setup-mac/dotfiles/.gitconfig
ln -s ~/setup-mac/dotfiles/.bash_profile
ln -s ~/setup-mac/dotfiles/.tmux.conf

rm ~/.profile

Also for `tmux` change MacOS keyboard shortcut so that CAPS LOCK maps to CTRL in "System Preferences > Keyboard" then "Modifier Keys..." button. This gives you the very nice `CAPSLOCK-a` (already setup in `.tmux.conf` instead of default `CTRL-b`.

## Additional Configuration

### Git configuration

Import your public/secret key for signing GitHub commits.

```bash
gpg --import ~/public-key.gpg
gpg --allow-secret-key-import --import ~/secret-key.gpg
gpg --list-keys
```

For first-time setup, generate brand new keypair with `gpg`: https://gist.github.com/Beneboe/3183a8a9eb53439dbee07c90b344c77e