DEV Community

drmikecrowe
drmikecrowe

Posted on

How do you take your .dotfiles with you?

Just curious: How do you take your bash, zsh or other shell config with you to another machine?

There are a plethora of tools out there (OhMyZsh, bash-it, etc) that help you configure your machine locally. But say you spin up a new machine. How do you personalize it with your aliases, etc?

I have a pretty extensive bootstrap.sh that sets up my ubuntu machine the way I want it. However, I'm starting to think that maybe the solution is one .bashrc or .zshrc that has everything (all my aliases, prompt variables, plugins, etc).

BTW, my complete solution is yadm for my private .dotfiles and secret config (pushed to a private AWS repo), dotphiles for my public .dotfiles config, and bash-it for bash customization.

Top comments (4)

Collapse
 
evanplaice profile image
Evan Plaice • Edited

My whole setup is automated. I even have Vagrant setup so I can test the provisioning process before I commit to wiping a machine.

Secrets are transferred separately on an encrypted thumb drive.

Never, ever, ever post secrets on GitHub.

Collapse
 
kwstannard profile image
Kelly Stannard

Use something in company for company specific things. Maybe Google drive or a private git repo.

A public git repo for personal things.

Collapse
 
i2oland profile image
Roland Olah

I have that stuff in a private github repository. Why not using it like this?

Collapse
 
drmikecrowe profile image
drmikecrowe

Private is fine (and I use that too), but I use that just for sensitive info. Part of what I liked about dotphiles is it is community maintained, and I can pull in upstream changes when needed.

For a while, I had a custom .bashrc. However, as ubuntu versions changed, that file changed as well and my universal file no longer set some defaults that ubuntu needed. Now, after installing my stuff, I just append the following to .bashrc:

source ~/.dotfiles/bash_it/bash-it.sh