Virginia lawmakers have finally agreed on a budget for the next two fiscal years after weeks of infighting.