New Computer Setup


A list of tools and dotfiles I use when setting up a new computer.


New PC setup(2022)

One thing I find interesting is different developers configs or tools they use for coding or everyday use. One developer might be completely useless on another developers computer depending on how much they have customized their configs or settings.

Your personal pc setup is a preference. There is no wrong or right way of doing it, it’s just what you are most comfortable to use.

My one recommendation I have is to learn the tools you like and be a “power” user with them. This will speed up your process and as you learn the tools you will figure out what you like and don’t. Then you can usually configure the tool to work how you like it. This is why text editors like vs code are so widely used. So do a deep dive, learn the keyboard shortcuts.

docker:

I don’t have much to say about docker other than its great! I run my databases in a container and its makes setting up new projects or transferring projects to new/different computers super simple.

In all my environments this is how I setup my database for that project.

I use a docker-compose file.

version: '3'
services:
  db:
    image: postgis/postgis
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
    ports:
      - "5432:5432"
    volumes:
      - ../temp/postgresql:/var/lib/postgresql/data
    container_name: db

make:

I use make to start the infrastructure to my projects; databases, message brokers etc…

.PHONY: start

UNAME_S := $(shell uname -s)
DC := $(shell docker-compose --version)

start:
ifndef DC
	$(error "docker-compose is not installed")
endif
ifeq ($(UNAME_S),Linux)
	@sudo docker-compose --file .development/docker-compose.yml up -d
endif
ifeq ($(UNAME_S),Darwin)
	@docker-compose --file .development/docker-compose.yml up -d
endif

by running $ make start I can get my local database running and anything else set in my docker-compose.

brew:

brew is a must have for any developer on mac. It is such a great tool and I always find myself needing to install it for one thing or another. If I can install through brew, I do.

https://brew.sh/

git:

This is another obvious tool.

brew install git

dbeaver:

dbeaver is one of the best open source database clients I have found. I do most of my database work in that when needed but psql is a great tool if you want to go the command line route

https://dbeaver.io/

Datagrip gets an honorable mention. Its proprietary software but is an outstanding db client.

https://www.jetbrains.com/datagrip

neovim:

brew install neovim

I like to use vim often but its not my 100% coding environment yet. I’ve put a lot of time into learning vim and building a text editor I really enjoy.

In my .vimrc I have got it in a great condition where it installs the plugin if its not there and then installs all the plugins

If you want to take a look it is located here https://github.com/dat1010/configFiles/blob/master/.vimrc

tmux:

brew install tmux

tmux is a terminal multiplexer. It helps you create different windows and panes in a new session inside the terminal. Some terminals allow you to do this natively but tmux is nice because it is lightweight and works in any terminal. Learning this along with vim takes some time, but is well worth the time and effort once you get proficient.(at least if you spend a lot of time in a terminal)

alacritty:

brew install --cask alacritty

This is a great gpu enhanced terminal. My config doesn’t have much but it adds some transparency. Its mostly the default yml but can be found here. https://github.com/dat1010/configFiles/blob/master/alacritty.yml

iTerm2 is another great terminal but I haven’t used that since I switched to alacritty.

My only gripe with alacritty right now is when running on linux I can’t copy/paste from the terminal to a different application. I’m sure there is a fix for this but haven’t spent the time to fix it and its not an issue the majority of the time.

vs code insiders:

For the times where I give up on vim I switch over to vs code (https://code.visualstudio.com/insiders/)

I like to use vs code insiders. This is a bleeding edge version of vs code. It makes me feel special for using it but I like all the updates its gets constantly.

I always install the cli tool so I can open vscode from the terminal Installation is simple and you can find those instructions here https://code.visualstudio.com/docs/setup/mac

xcode:

Obviously this is only for mac. I don’t have any special setup here, just download from the App Store.

direnv:

I use this for my local environment variables. It’s pretty simple to install and use

https://direnv.net/

and don’t forget to add the hook for bash or zsh

https://direnv.net/docs/hook.html

asdf:

brew install asdf

I use asdf for installing and managing version with elixir and erlang.

I mostly just follow this guide https://www.pluralsight.com/guides/installing-elixir-erlang-with-asdf then I install the latest erlang and elixir versions on new systems.

configs:

First lets talk about dotfiles. There are a lot of other blogs and break down of dotfiles that do a much better job than I ever could so I will mostly defer to those if you are looking for more information but a brief intro to them are that they are a plain text file that set configurations for your system or programs.

Thoughtbot has a great intro to them https://thoughtbot.com/upcase/videos/intro-to-dotfiles

my dotfiles:

.zprofile

# You may want to put all your additions into a separate file like
# # ~/.bash_aliases, instead of adding them here directly.
# # See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.aliases ]; then
        . ~/.aliases
fi

# Set PATH, MANPATH, etc., for Homebrew.
eval "$(/opt/homebrew/bin/brew shellenv)"

.zshrc

. $HOME/.asdf/asdf.sh

.aliases

alias cls='clear'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

alias gs='git status'
alias ga='git add'
alias gc='git checkout'
alias gcm='git commit -m'
alias gcs='git commit -S -m'

alias ci='code-insiders'

alias tf='terraform'

flyctl:

brew install flyctl

I use fly.io for personal projects so installing flyctl is a must

https://fly.io/docs/hands-on/install-flyctl/

video editing:

For some of my drone videos I like to edit a little bit so I will either use Adobe Premere Pro or kdenlive.

kdenlive is a great free open source video editor.

https://kdenlive.org/en/