The D.C. government seems to be grooving on Reaganomics.

The city ended the past fiscal year with a tidy $17 million left over to help retire the accumulated deficit, thanks largely to a record federal payment that was approved by the Reagan White House.

Looking to the coming year, D.C. revenues are expected to increase by $159 million, without any increase in the tax rates, because of the continued improvement in the economy and a decline in unemployment.

The anticipated revenue windfall enabled Mayor Marion Barry to once again play Santa last week, as he unveiled a proposed fiscal 1986 operating budget that included generous spending increases for public schools, jobs, mental health, day care, emergency shelter, economic development and other worthy causes.

He ruled out using those funds to provide District residents with a little tax relief. For the third straight year he has refused to set aside funds in his budget for deficit retirement, preferring to leave that decision to the City Council and Congress, or to whatever surplus may be available at the end of the year.

Barry, a Democrat, is so pleased with the way things are going under the Reagan administration that he wouldn't dream of criticizing the president's proposal to freeze the federal payment to the District next year at the current level of $425 million.

This hardly seems to be the same Barry, who last fall, as chairman of the Special Committee on a National Urban Policy for the U.S. Conference of Mayors, released a conference report highly critical of Reagan administration policies a few days before the November election.

At a news conference last week, the mayor sounded vaguely like a spokesman for the White House as he explained how terribly difficult it would be for David Stockman, Edwin Meese and his other administration buddies to go along with additional funds for the District while denying them to others.

Reagan's crusade to whittle the federal deficit to a manageable $180 billion next year would come unglued if the administration made an exception for the District, the mayor earnestly explained.

Rather than make a big fuss about the federal payment freeze, Barry said, he will focus his efforts on trying to win support for a fixed formula for determining future federal payments.

Barry seemed equally sanguine about other 1986 budget cuts proposed this week by the Reagan administration that could put a crimp in District operations.

The city would lose about $17 million in aid next year if Reagan succeeds in eliminating the general revenue sharing program. The District would lose $26 million in tax revenues if Reagan pushes through a 5 percent reduction in pay to federal workers.

Many of those federal workers live in the District. A reduction in their salaries would result in a loss of D.C. income tax revenue.

But these and other proposed cutbacks must be approved by Congress, and right now there doesn't seem to be much support on Capitol Hill for the president's domestic spending agenda.

Barry, who has spent time sounding out congressional leaders on the subject, doubts that Congress will go along with many of the president's most severe domestic cuts. Even assuming that the president prevails in some of those efforts, the mayor said, the District government will make the necessary adjustments.

"As a city government, we're not going to spend time worrying about what will happen until it happens," Barry said. "Right now, we don't know what will get through."