  We study the vacuum fluctuations of a quantum scalar field in the presence of
a thin and inhomogeneous flat mirror, modeled with a delta potential. Using
Heat-Kernel techniques, we evaluate the Euclidean effective action
perturbatively in the inhomogeneities (nonperturbatively in the constant
background). We show that the divergences can be absorbed into a local
counterterm, and that the remaining finite part is in general a nonlocal
functional of the inhomogeneities, which we compute explicitly for massless
fields in $D=4$ dimensions. For time-independent inhomogeneities, the effective
action gives the Casimir self-energy for a partially transmitting mirror. For
time-dependent inhomogeneities, the Wick-rotated effective action gives the
probability of particle creation due to the dynamical Casimir effect.
