Here's the ergonomic setup that's currently working for me.
1. Keyboard: Kinesis Advantage ($300). These used to give me pain in my palms, until I started using SmartGloves (item 3). I like how this keyboard puts Ctrl and Alt on the thumbs instead of the pinky (which, if overworked, can lead to Emacs Pinky). I've also found the Microsoft Natural 4000 keyboard ($80) to be good; unfortunately it locates Ctrl and Alt at the pinky.
2. Trackball: Kensington Expert Mouse ($150). Using a mouse gives me various aches. This trackball doesn't, for some reason.
3. SmartGloves ($100). Keeps your wrists from bending backwards (pronation), by means of a hard foam strip down the back of your hand, and a beanbag under your palm.
4. Forearm support: rolled up towel ($0). Inexpensive way to prevent forearm pain, especially with the 1.5"-tall Kinesis keyboard.
5. Table, 26" high. This is a good height for me, as it keeps my elbows at right angles.
6. (Not shown) Good office chair with back support ($150).