This is a list of reproducible steps to get a clean Mac (with Apple Silicon) up and running with nice dotfiles for Fish, plus a whole bunch of apps and development tools.
Restore your saved ssh keys or create a new pair.
Make sure they have the right permissions:
$ chmod 600 ~/.ssh/* && chmod 700 ~/.ssh && chmod 644 ~/.ssh/*.pub
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/kevin/.zprofile
$ eval "$(/opt/homebrew/bin/brew shellenv)"
$ brew analytics off
Clone this repository
$ git clone [email protected]:kevinrenskers/dotfiles.git
And run the bootstrap.sh
script. Alternatively, only run the setup.sh
scripts in specific subfolders if you don't need everything.
Restart your shell after it's done.
You can now run fish_config
to change the terminal colors, abbreviations, etc.
Don't forget to set your git credentials, or you'll be using my details which are in the dotfiles:
$ git config --global user.name "Kevin Renskers"
$ git config --global user.email "[email protected]"
I'm using Poetry as the package manager and environment manager for Python projects, together with pyenv to install specific versions of Python, and pipx to install and run global tools. I do not use Homebrew to install Python, nor do I use the system version of Python.
Start by installing pyenv and pipx:
$ brew install pyenv pipx
Then install a Python version, for example 3.12:
$ pyenv install 3.12
$ pyenv global 3.12
Make sure it works:
$ which python3
$ python3 --version
They should point to the version installed in the .pyenv
folder and of course match the version you specified.
Now we can install Poetry:
$ pipx install poetry
And to make sure it works:
$ poetry --version
Some useful settings to enable:
$ poetry config virtualenvs.in-project true
$ poetry config virtualenvs.prefer-active-python true
These settings will make working with local Python versions via pyenv a lot easier, and make it a lot easier to nuke the .venv
folder within a project to reinstall your dependencies.
I love git up, which updates all local branches with remote changes, by rebasing rather than merging. You just run git up
in your project and everything is up to date.
After installing pipx, you can simply install git up with one command:
$ pipx install git-up
I'm using rbenv instead of the system Ruby, to prevent annoying permission problems. You should never have to use sudo
to install gems!
brew install rbenv
rbenv init
Follow the printed instructions to set up rbenv shell integration. Close your terminal and open a new one so the changes take effect. Then verify that everything is okay:
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash
Now you can install (and then use) a Ruby version, for example:
rbenv install 2.6.4
rbenv global 2.6.4
Simply download Postgres.app from http://postgresapp.com. I love Postico 2 as my database client.
After installing Postgres.app, run the following command to get access to the command line tools:
sudo mkdir -p /etc/paths.d && echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp
I'm using pnpm as my Node package manager, and to install specific Node versions.
$ curl -fsSL https://get.pnpm.io/install.sh | sh -
$ pnpm env use --global lts
Restart your shell and check if everything works: node --version
.
To update pnpm itself:
$ pnpm add -g pnpm
$ brew install nginx
$ sudo ln -sfv /usr/local/opt/nginx/*.plist /Library/LaunchAgents
$ sudo mkdir /var/log/nginx/
Edit /usr/local/etc/nginx/nginx.conf
, change port
to 80
and error_log
to /var/log/nginx/error.log
. Then start the server:
$ sudo nginx
Config file:
/usr/local/etc/nginx/nginx.conf
Other commands:
$ sudo nginx -s stop
$ sudo nginx -s reload
- Mathias Bynens for sharing his dotfiles, bootstrap script and installation instructions.
- Michael Moyle for his Nginx/PHP-FPM installation instructions.
- Rosco Kalis for sharing hit dotfiles