Treat dotfiles as code
As a developer, i have spent lot of time in making my configuration suitable for my me. I would hate to lose all those effort when i lose it. Create a repository on github (or any git hosting solution) and store it there.
My dotfiles are at http://github.com/ageekymonk/dotfiles
Write a Makefile
Write a Makefile so that you can install specific configuration. For example i
use make emacs
to install my emacs configuration.
This way you can quickly move to a new computer
Private Configs and Secrets
-
Obviously you cannot store them in public repository. My thoughts on this
is
- Use a Private Repository This prevents you checking in private configs accidentally making it public and visible to everyone.
- Encrypt the secrets Keeping the private info plain text is not secure. It will be secure when you encrypt it at rest. git-crypt is an excellent tool for that.
- Sign your commits To find out any tampering of files, it is best to sign the commit, so that you can be comfortable knowing that no one has tampered with the git repo itself as it is hosted on some platform.