We construct explicit analytic solutions of the $SU(N)$-Skyrme model (for generic $N$) suitable to describe different phases of nuclear pasta at finite volume in $(3+1)$ dimensions. The first type are crystals of Baryonic tubes (nuclear spaghetti) while the second type are smooth Baryonic layers (nuclear lasagna). Both the ansatz for the spaghetti and the ansatz for the lasagna phases reduce the complete set of Skyrme field equations to just one integrable equation for the profile within sectors of arbitrary high topological charge. We compute explicitly the total energy of both configurations in terms of the flavor number, the density and the Baryonic charge. Remarkably, our analytic results disclose a novel finite-density transition arising from the competition between the nuclear spaghetti and lasagna phases. Well within the range of validity of the model, one can see that the lasagna phase is energetically favored at high density while the spaghetti is favored at low density. Finally, we briefly discuss the large $N$ limit of our configurations.