Skip to content

Dotfiles are a way of backing up and syncing my settings the my setup across multiple machines.

Notifications You must be signed in to change notification settings

viktree/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 

Repository files navigation

dotfiles

This dotfiles repo is my preferred way to back up and syncing my settings/configurations across multiple machines. I often discover helpful settings or programming gems while toying around and it's great to have them nestled within the confines of this repo.

branches, machines and naming structure

I have my configurations for each computer/account managed using a separate branch.Branches are named using either <os>/<hostname> or <os>/<hostname>. To avoid ambiguities, I've referred to osx as mac in the branch names.

I've based the $HOSTNAME of my personal computers off the characters from The Adventures of Tintin.

Active development environments

  1. mac/sponz My personal m1 mac book air that I use for most things.

  2. mac/ecobee-mbp-2019 My ecobee work laptop

No longer in use

  1. mac/tintinux was my previous personal machine

  2. arch/pv-workstation, ubuntu/pv-laptop and mac/ecobee-web are my previous work laptops from Per Vices and ecobee respectively.

  3. uoftcs/wolf Some of the configuration files from U of T's computer science server. Not quite sure why it was called wolf.

  4. arch/haddock and arch/rastapopoulos are some of my dabblings in archlinux before my current setup

  5. ubuntu/alcazar This is a nvidia jetson that I used to have sitting on my desk at home.

Setting up a new computer

Of the many possible ways to manage dotfiles, I came across a framework I like outlined in this hacker news post and then elaborated on in this atlassian blog entry. Unlike many of the other options, this strategy doesn't depend on having symbolic links or bulky programs (the only prerequisite is git)!

I used this for the first little while and then I started to peek over at yadm, which is a program that pretty much does the same thing under the hood and comes with a couple of other nice features. We are still only using a glorified git repo.

Settings up a new machine without yadm

# ssh version: [email protected]:viktree/dotfiles.git
git clone --bare https://github.com/viktree/dotfiles.git $HOME/.cfg

# Keep this in a bashrc or an equivalent file
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'

config checkout  -b <descriptive-branch-name>
config config --local status.showUntrackedFiles no
config add <file-to-backup>
config commit -m "initial commit"
config push --set-upstream origin <descriptive-branch-name>

Settings up a new machine with yadm

First download yadm from source (without a package manager)

git clone https://github.com/TheLocehiliosan/yadm.git ~/.config/yadm
ln -s ~/.config/yadm ~/bin/yadm

Then we need to point it at this repo

# ssh version: [email protected]:viktree/dotfiles.git
yadm remote add origin https://github.com/viktree/dotfiles
yadm pull

We can setup the machine by running bootstrap

yadm bootstrap

Finally, we cut a new branch and push the files

yadm checkout -b <descriptive-branch-name>
yadm add <file-to-backup>
yadm commit -m "initial commit"
yadm push --set-upstream origin <descriptive-branch-name>

After branch creation

Here's a checklist of things to go over

  • add machine specs to the README.md file of the branch
  • add entry to this file on the master branch
  • make sure to commit to the branch frequently

Link to how these files are setup and the configuration files for my other machines

About

Dotfiles are a way of backing up and syncing my settings the my setup across multiple machines.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages