Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caarlos0-graveyard/macOS
How I setup a new Mac
https://github.com/caarlos0-graveyard/macOS
Last synced: 4 days ago
JSON representation
How I setup a new Mac
- Host: GitHub
- URL: https://github.com/caarlos0-graveyard/macOS
- Owner: caarlos0-graveyard
- Archived: true
- Created: 2017-05-12T22:13:17.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-24T19:39:09.000Z (over 1 year ago)
- Last Synced: 2024-08-01T13:29:10.823Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 162 KB
- Stars: 73
- Watchers: 2
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred-test - caarlos0-graveyard/macOS - How I setup a new Mac (Ruby)
README
# Mac
How I setup a new Mac.
## 1. Install brew
```sh
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```## 2. Install deps
```sh
git clone https://github.com/caarlos0/mac.git
cd mac
# edit Brewfile to remove/add things
brew bundle
```## 3. Install dotfiles
Outdated: follow instructions in https://github.com/caarlos0/dotfiles.fish
```sh
git clone https://github.com/caarlos0/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./script/bootstrap.fish
fish
```Not so-sensible defaults:
```console
./macos/set-defaults
```## 4. Setup SSH keys
Create a new SSH key or copy the previous one into `~/.ssh`. That should be
it.Also fix perms:
```console
$ chmod 0600 ~/.ssh/id_rsa
```## 5. Setup GPG signing
Create default config files:
```console
gpg --list-keys
```Setup pinentry:
```console
brew install pinentry-mac
echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
killall gpg-agent
```Import the key:
```console
export GPG_TTY=$(tty)
keybase pgp export -q C14AB940 | gpg --import
keybase pgp export -q C14AB940 --secret | gpg --import --allow-secret-key-import
```> Change C14AB940 with your key id.
Setup git:
```console
git config --global gpg.program $(which gpg)
git config --global user.signingkey C14AB940
git config --global commit.gpgsign true
```> Change C14AB940 with your key id.
Test it:
```console
mkdir -p /tmp/test
cd $_
git init
git commit --allow-empty -m 'signsss'
git log --show-signature
```That's it!
## 6. Reboot
```console
sudo reboot
```## 7. Profit!
:beers: