Skip to content

johannesgiorgis/.dotfiles

Repository files navigation

Dotfiles

Various settings for the tools I use. My dotfile repository was initially created by a combination of following Victoria's excellent How to set up a fresh Ubuntu Desktop using only dotfiles and bash scripts and structured to match Holman's dotfiles (Github - Holman's Dotfiles).

Setup

Linux - Debian

To set up a new Debian based Linux system, do the following initial steps upon logging in:

# Downloads and install xclip BEFORE running any updates
$ sudo apt-get install xclip

# Run Updates
$ sudo apt update -y && sudo apt upgrade -y

# Navigate to GitHub and log in -> Settings -> SSH & GPG Keys -> New SSH Key

# Generate new SSH Key
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

# Add newly created SSH key to GitHub account

# Use xclip to copy content of public key so you can paste it in GitHub
$ xclip -sel clip < ~/.ssh/id_rsa.pub
# Copies the contents of the id_rsa.pub file to your clipboard

# Clone dotfiles
$ git clone git@github.com:johannesgiorgis/dotfiles.git ~/.dotfiles

# Run ansible playbook
$ cd ~/.dotfiles
$ bash bin/dot-bootstrap <tag>

Doing it this way ensures that you can run your updates while you get set up to clone the repo and start the rest of the set up.

MacOS

# Install Command Line Developer Tools
xcode-select --install


git clone https://github.com/johannesgiorgis/dotfiles.git ~/.dotfiles
cd ~/.dotfiles  
git checkout explore-ansible-2
git pull
bash bin/dot-bootstrap # install homebrew/ansible

# Add home-brew to PATH (manually) from installation output
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/johannes/.zprofile

# disable analytics
export HOMEBREW_NO_ANALYTICS=1
brew analytics off

# Install packages
$ bash bin/dot-bootstrap <tag>

Updates

When doing a meaningful upgrade, tag it via:

git tag -a <dotfiles-version> -m 'Dotfiles <dotfiles-version>: <some-description>'

# example
git tag -a v1.0 -m 'Dotfiles v1.0: The Bash Way'

Testing

Run the following:

# build docker image and run docker container
$ make docker-all

# once in the docker container, run
$ bash scripts/bootstrap.sh | tee setup_log.log

# another testing
$ bash scripts/bootstrap.sh | tee log-2020-05-10-bootstrap-v<num>.log 2>&1

Dotfiles V2

= to-do list

This is currently a wishlist.

As I continue to customize the various scripts, I wanted more control over certain functionality - let user choose which custom program to install, not install, etc. Yet I don't want to write and go throught the trial and error of bash scripting.

This led me to research how to manage dotfiles and found several options - ansible, dotstow. I came across several articles:

Folks are using Python, Typescript to write wrapper programs around their .dotfiles management. Maybe some combination of bash + ansible could work.

Simplifying zsh shell to remove dependency on Oh My Zsh!

Zsh history

Reference