The layoffs hit the Departments of Interior, Energy, Veterans Affairs, Agriculture, and Health and Human Services.