The complaint and consent decree filed Monday by US Attorney Geoffrey Berman makes clear that the failures of the New York City Housing Authority, by far the nation’s largest, went well beyond the notorious lack of heat and hot water experienced by 300,000-plus tenants this past winter.

The complaint shows that there was not only incompetence but malice. The decision to lie about conducting lead paint inspections was, we learn, part of a pattern: turning off water rather than fixing leaks; posting danger signs to keep away federal inspectors.

The housing authority once held up as the exception to more notorious projects, such as those in Chicago, has been shown to be in a corrupt league of its own. Tenants’ welfare was clearly no priority for a unionized workforce asked to perform what should’ve been straightforward services: keeping the heat and lights on, picking up the garbage, making sure the front-door buzzers work.

You have to defer — and screw up — a lot of projects for the system itself to find an estimated capital-project backlog of anywhere from $18 to $26 billion. But, as any homeowner knows, if the roof goes unrepaired, all sorts of damage can follow.

If NYCHA managers were private landlords, they’d have been perp-walked in front of the federal courthouse. Small maintenance failures have big consequences — as in the case of Akai Gurley, shot to death in 2014 by NYPD Officer Peter Liang in what news accounts referred to as the “darkened public housing project stairwell” at Brooklyn’s Pink Houses. Memo to NYCHA: Stairwells don’t have to be dark.

Mayor Bill de Blasio and Gov. Andrew Cuomo are quick to blame what they call “federal disinvestment” for NYCHA’s ills. They apparently are unfamiliar with the fact that, when it was established by Franklin Roosevelt, public housing was expected — after being built with government financing — to cover its own maintenance costs, with a combination of rents from tenants and retail uses in the projects. Liberals pushed through a cap on rents, starving NYCHA of funds, and New York planners kept supermarkets and drug stores out of the projects, isolating tenants and foregoing revenue.

De Blasio ignores the fact, too, that this year, HUD has actually increased both its capital assistance and operating subsidies for NYCHA — by 46 percent in capital funds and 3 percent overall, to nearly $1 billion.

He also ignores that, during his administration, NYCHA failed to apply soon enough for the most important new source of federal funds made available in decades. The Rental Assistance Demonstration program — designed by former New York housing commissioner Shaun Donovan when he became HUD secretary — uses tax credits to bring in a gusher of private repair funds.

In exchange, the projects are turned over to private owners, however — with a deal that units will be maintained as low-rent for a fixed period of years.

The fear of the “p” word — privatization — kept NYCHA from applying for a program that was tailor-made for it, while dozens of housing authorities around the country leapt at the chance.

Indeed, while being so quick to blame so many others, the administration has failed to seize a wealth of opportunities. The Bloomberg administration left behind blueprints for new privately financed developments to be built on the underused parking lots ubiquitous in the projects.

As the Industrial Areas Foundation has been pointing out in City Hall demonstrations, these new apartments would allow NYCHA’s thousands of elderly apartment dwellers to move out of multi-bedroom units into new studios — making way for the thousands of families either on waiting lists or in shelters, whose number de Blasio is so keen to increase.

That’s another NYCHA failure: At least a quarter of its tenants are “over-housed,” which means they have one or more empty bedrooms. NYCHA hasn’t been able to figure out how to match them with the kind of units they need.

Sadly, $2 billion in city funding is unlikely to do much to repair NYCHA — not when its costs are bloated by a unionized labor force, even when the city abounds with private contractors who can do the job better and more cheaply. What’s needed is a rethinking of the whole idea of public housing — a failed 1930s-era experiment in socialist housing that has left its tenants in the cold and dark.

Howard Husock is vice president of research publications for the Manhattan Institute.