Steep cuts across departments went toward funding a defense spending increase and an infrastructure plan.