I know this is the umpteenth bike/camera mount instructable, but I did it a bit differently than the rest, however, and I thought I'd share my techniques. In this instructable I'll show one way of attaching your camera onto your headset for forward-looking photos, and onto your rack for rear-looking photos.
Step 1: Acquire Components.
Primarily, you will need a "ball head" from a tripod, as well as a matching-size bolt to thread it on. I'm a bit of a chump and paid $90 for the excellent Manfrotto 484RC2 ball head with quick-release, although if you check eBay you can find them for cheaper. This particular ball head uses a 3/8" thread, which I like because it's bigger and stronger than just your standard 1/4" camera tripod mount size, which some cheaper ball heads use.
You'll need a few washers, lock-washers, and locknuts, although I'm not going to detail specifically how many and what size you need, since that depends on your bicycle. It's quite simple, just improvise it as you go. I spent about $4 at the hardware store for each of the mounts I'm about to show you, including bolts, nuts, and washers.
Oh, and for the headset-mount, you'll need an old seatpost clamp, salvaged from an old bicycle or perhaps the parts room of your local community bike shop, if you have one.
Step 2: Forward Facing Headset Mount
This step is fun. With any luck, you have a community bike shop in your city, full of old junky bike parts that you can repurpose for this project. What you'll need is the old-style seat clamp (the clamp that connects your seatpost to your seat, but not the newer style that is integrated directly into the seatpost).
What you'll want to do is take the bolt out of the seatpost clamp, as it's likely the wrong size for your ball head. Now bend the seatpost clamp open, fit it around your headset, squeeze it back together, and thread your 3/8" bolt through. Ensure you have a lock washer and a regular washer in place first, then the seatpost clamp, then a washer and a locknut on the other side, so it all clamps down tightly and stays tight.
Step 3: Rear-Facing Rack Mount
This one is even simpler as it doesn't require any used bike parts, just regular bolts and washers from the hardware store.
Unfortunately I wasn't able to find one washer that was simultaneously large enough to make 3 points of contact on my rack, with a 3/8" hole in the center, so I had to stack a small washer onto a larger washer.
So what you want to do here is take your bolt, slip on a lock washer, a small washer, a larger washer, then feed the bolt through some opening on your bike's rack, then the larger washer, the small washer, and a locknut.
Step 4: Make Photos!
Knock yourself out! I use a cable release with my D200 when I have it mounted on the rear rack, but if I'm recording videos with my little digicam, I just set it to record then hop on the bike and ride away. iMovie can clip out the bad parts of the videos later ;-)