If you are talking about the carbon Nokon housing... DON'T DO IT! I tried with very dangerous results. As for the aluminum housing, they are the same between brake and derailleur... only the inside diameter of the liners is different.
The derailleur cables may work for a little while as brake cables, but they won't last long. Also, the smaller heads on the cables will likely tear up the cable stops inside your levers.
Not only that, but derailleur cable housing has parallel un-spiralled wires held in place by a jacket. It's designed this way to be stiff in compression, as is required for precision indexed shifting... but at the same time it is low in ultimate strength. Think of it as being brittle. The failure mode is that the jacket ruptures and the wires balloon outward. Suddenly.
Compare that to brake housing which has a continuous spiral wrap of wire. The jacket's only there to keep dirt out, the wire provides all of the compressive strength and it is considerable. Think of it as being tough but flexible. About the only failure mode conceivable would be for one wrap of the spiral to pop outward, which would only lose you a millimeter or two of cable travel.
I'm all for trying to find or build lighter cables, but at least use them the way they were designed: derailleur cables for precision actuation, brake cables for strength. If you want lighter brake cables, research industrial suppliers of Bowden cables, I'm sure they're available in smaller sizes than those deemed safe by brake manufacturer's liability departments, that will still be much stronger, with much more gradual failure modes, than derailleur cables.