Using fluctuation theory, we solve the two-sided exit problem and identify the ruin probability for a general spectrally negative Lévy risk process with tax payments of a loss-carry-forward type. We study arbitrary moments of the discounted total amount of tax payments and determine the surplus level to start taxation which maximises the expected discounted aggregate income for the tax authority in this model. The results considerably generalise those for the Cramér-Lundberg risk model with tax.