It is certainly possible. What you're describing is a situation in which all three bodies are always in a straight line, which rotates with uniform angular velocity. All three bodies will be executing uniform circular motion about their common barycenter. You can write down the equations of motion for the system in terms of the three radii of their circular orbits, the masses, the desired angular velocity of the system, and Newton's constant $G$. There will be three equations, one for each body; which means that (for example) given the masses of all three bodies and an angular velocity for the system, you can solve for the distances required to make this motion happen. (It may not be possible to solve these equations algebraically, but you can always resort to numerical solutions.) For example, if you do this calculation for bodies with the masses of the Sun, the Earth, and Earth's moon, you find that the Earth orbits the barycenter with a radius of about 1.00018 AU and Earth's moon orbits the barycenter with a radius of 0.99015 AU.
However, such a configuration is almost certainly unstable. In the limit of a negligible moon mass, this configuration would put the moon at the L1 point for the star-planet system. The L1 point is well-known to be an unstable spot—objects placed there will tend to drift away from it. I would not expect this instability to be cured if the moon's mass was non-negligible.
Note also that you would have to finagle the sizes of the bodies just right to get a "permanent eclipse" the way you want. In the above example, the Moon would be about four times farther away from the Earth than it is in our Universe; which means that it would be four times smaller in apparent size and wouldn't cover the entire solar disk.