UPDATE: My $HOME for my dotfiles is now https://github.com/kaihendry/dotfiles
Inspired by Joey Hess in the past couple of years I have had my homedir in a subversion repositry. I tipped about this a while back, but I thought I should give the topic some blog treatment.
When I move to a new machine in $HOME:
hendry@perry:~$ ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key (/home/hendry/.ssh/id_dsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/hendry/.ssh/id_dsa. Your public key has been saved in /home/hendry/.ssh/id_dsa.pub. The key fingerprint is: 6c:2e:4e:8a:f2:54:b3:1a:89:25:59:65:f9:fe:1a:2f hendry@perry hendry@perry:~$ ssh-copy-id -i .ssh/id_dsa.pub hendry.iki.fi 15 Password: Now try logging into the machine, with "ssh 'hendry.iki.fi'", and check in:
to make sure we haven’t added extra keys that you weren’t expecting.
hendry@perry:~$ svn co svn+ssh://firstname.lastname@example.org/home/hendry/repo/public/home .
svn: Failed to add file ’.bashrc’: object of the same name already exists
Unfortunately, this generally means I have to manually remove .bashrc, .bash_profile et al out the way and re-run the checkout a couple of times.
If I wish to read and write emails from that machine, I generally need my addressbook and mutt colouring from another private repository:
svn co svn+ssh://email@example.com/home/hendry/repo/private/Mail
I don’t keep my Maildir (mail archives) in the repo because I filter mails through Gmail and use offlineimap/mairix dumps from my IMAP server on whatever machine I read mail from. So there tends to be copies or backups of my Mail.
Browse my public repository to learn more.
It isn’t perfect.
- I often forget to commit after a change. I tried automated commits with mixed results and maybe I should again.
- I need to incorporate my favourite package listing, so I can apt-get the packages I typically need like screen, vim, irssi-text, offlineimap, mairix etc. (hmm, perhaps a Debian package for my homedir…)
- Subversion can’t handle symlinks. Arse. (Update: Oh, it can now)
I had some awful problems keeping .mozilla in there, in order to maintain my bookmarks. Now I am keeping them with
I don’t keep binary files like porn or mp3s in there. I back them up occasionally with rsync like so:
rsync -essh -rtpv ~/pictures backupmachine: