Bikeshedding my ~/src
My home directory contains a directory called src
, an abbreviation for
“source”. This directory is indeed the source of many things, which range
from router configuration for AS207480, to git repositories for
software (both of my own creation and from third parties), to the sources for
the website you’re reading just now.
There are far too many possible ways to organise all of this. Up until this
afternoon, anything which was version controlled was under ~/src/git
,
however I have rather a lot of stuff which is version controlled using git,
which doesn’t offer terribly granular categorisation. I also have some things
which aren’t version controlled, for various reasons, but they’re more of an
exception than the norm. I decided to take a shot at reorganising this, to see
if I can find a better way of laying out all the “sources” on my laptop.
In no particular order…
ops
: stuff which isn’t necessarily code, but is useful for management of other machines. This includes things like router configuration and DNS zonefiles, and the magic Makefile for doing bulk package updates on other machines.pub
: code for which I’m the original author and which is published on the web. For example, I wrote a little SAT solver, whose source lives in here.local
: code for which I’m the original author which is not published on the web. These are usually small or unfinished things which I don’t really want to let other people at.grey
: code which I originally wrote which is sort of semi-public but not really. Everything in here is a private repository on GitHub which I haven’t really worked out what to do with yet.3rdparty
: code which other people wrote originally, to which I contribute or have contributed. There’s quite a bit of variety in here, as there are a couple of repositories in here which I’ve only ever contributed a single commit to, and there are others which have been pretty heavily customised to the point of being a soft fork.clone
: copies of git repositories for other people’s code which I haven’t modified. This is mostly software which I have installed locally which either isn’t in my package manager’s repositories or which I’m managing locally instead of using an upstream package. There are also a few projects here whose code I have around for reference purposes instead of directly using.archive
: old personal projects which I’m no longer interested in. The boneyard.debian
: Debian source packages for packages which I’ve patched or modified. There are generally two cases when something gets added here. Occasionally, I need a newer version of something than what’s available in the stable release, or isn’t available for the stable release at all (and isn’t in the backports repositories). Other times I need to apply a patch to a package locally to add features or fix bugs (if the fix I need hasn’t made it into a stable release). Some things do get removed from this directory, occasionally, if e.g. a newer version of some package which I require makes its way into the backports repositories.patches
: miscellaneous patches for things which aren’t otherwise committed into a version control repository somewhere.web
: sources for web things. This includes the code for my site’s front page and the source for my blog.misc
: various short-form hacks and snippets which I’ve either written or sourced from elsewhere which aren’t substantial enough to go into their own repositories.
This isn’t to say that this is the perfect layout. I’m a bit irked about
the existence of ~/src/grey
, but that may one day turn into motivation to
actively deal with the reasons for its existence in the first place. Debian
packages are a minor headache occasionally, though that’s only really because
they don’t behave like everything else.
It’ll probably take less than a year for me to change my mind and reorganise everything again.