Fairfax County spent about $120,000 in the past year defending itself in court from Justice Department charges that the county had engaged in systematic discrimination against women and minorities, county attorney F. Lee Ruck said yesterday.

A U.S. judge in Alexandria last month rejected most of the federal government's claims of discrimination and praised Fairfax County's "impressive and persuasive" affirmative action program. Judge Albert V. Bryan Jr. did find that the county had discriminated against women in hiring service and maintenance workers.

Ruck told the county Board of Supervisors yesterday that the discrimination suit has cost between $117,000 and $120,000 in "hard cash to the county," including $91,000 in staff time.

Board Chairman John F. Herrity, a Republican and frequent critic of the federal government, said yesterday that the Justice Department was "coming in here on a fishing expedition and ripping us off."

Judge Bryan said in his decision that prior to the county's affirmative action program, approved in 1978 by a 5-to-4 vote of the Board of Supervisors, there had been "purposeful discrimination" against blacks in hiring of police officers, firefighters and service and maintenance workers.

In other action at yesterday's baord meeting, the supervisors unanimously approved a $19,000 pilot program for the use of gasohol in some county-owned vehicles during the next year. Supporters of gasohol say it could significantly reduce American dependence on foreign oil.

The board has been heaping praise on gasohol, a blend of 90 percent gasoline and 10 percent alcohol. The mixture can be used in most cars without engine modifications. Herrity last month held a press conference to announce that he had used alcohol successfully in his car.

The county plans to buy 150,000 gallons of gasohol over the next 12 months. The ethyl alcohol will be purchased for $1.75 a gallon from the Fannon Petroleum Company of Alexandria, the only supplier of the substance on the Wast Coast.

A county report said the conversion of all county gasoline-powered of alcohol at an additional cost of $610,000.

The report said that purchase of the gasohol for the pilot program cannot be justified "on a straight cost-benefit relationship . . . at this time," but that future increases in the cost of gasoline may justify the spending.

The board also voted yesterday to approve price increases in Metrobus and Metrorail fares by about 10 percent for Fairfax commuters going into the District of Columbia. Fiinal action on the proposed fare increases will be taken Thursday by the Metro board.

The proposed increase would raise the present rush-hour bus fare from 50 cents to 55 cents and add 5 cents to the river-crossing charge, raising it to 30 cents.

A 5-cent increase in the base charge for subway fares also proposed, increasing the fare from 40 cents to 45 cents.