The solution is Treasury Inflation Protected Securities (TIPS). You do have to pay taxes on the inflation adjustment (OID income). As long as the interest (after taxes) is higher than taxes on inflation adjustment you're good.
Don't forget the $10,000 annual limit of purchases. If you want to go heavy into TIPS, you can hit that limit pretty quick.