We present an all-laser-driven, energy-tunable, and quasimonochromatic x-ray source based on Thomson scattering from laser-wakefield-accelerated electrons. One part of the laser beam was used to drive a few-fs bunch of quasimonoenergetic electrons, while the remainder was backscattered off the bunch at weakly relativistic intensity. When the electron energy was tuned from 17-50 MeV, narrow x-ray spectra peaking at 5-42 keV were recorded with high resolution, revealing nonlinear features. We present a large set of measurements showing the stability and practicality of our source.