Should you use iCloud Drive to store your dotfiles?

Should you? I can’t answer that. What I can say is here’s how I did it.

Where is iCloud Drive even on your computer? Jeffrey Morgan told me it’s here:

~/Library/Mobile\ Documents/com~apple~CloudDocs

I took it a step further and symlinked the folder:

ln -s ~/Library/Mobile\ Documents/com~apple~CloudDocs ~/iCloud

Then I mkdir ~/iCloud/dotfiles and started linking my configs:

# ssh
mv ~/.ssh ~/iCloud/dotfiles/
ln -s ~/iCloud/dotfiles/.ssh .ssh

# zshrc
mv ~/.zshrc ~/iCloud/dotfiles/
ln -s ~/iCloud/dotfiles/.zshrc ~/.zshrc

# POSIX config
mv .config/ ~/iCloud/dotfiles/.config/
ln -s ~/iCloud/dotfiles/.config .config

Then you can make a bash script if you’re cool or a blog post if you’re me!

PS -

Sam says to make sure your iCloud Drive is e2e encypted (sup NSA call me 🤙) by going into system settings and turning on “advanced data protection”