We theoretically investigate a scheme for the generation of single hard-x-ray pulses of controllable duration in the range of 1-100 ns from a radioactive Mössbauer source. The scheme uses a magnetically perturbed Fe57BO3 crystal illuminated with recoilless 14.4-keV photons from a Co57 radioisotope nuclide. Such a compact x-ray source is useful for the extension of quantum optics to the 10-keV energy scale, which has been in the spotlight in recent years. So far, experimental achievements have mostly been attained in synchrotron radiation facilities. However, the use of tabletop and portable hard-x-ray sources for time-resolved measurements and for implementing coherent control over nuclear quantum-optics systems has still been limited. The availability of compact hard-x-ray sources may become the engine for the application of quantum-information schemes down to the subatomic scale. We demonstrate that the present method is versatile and provides an economic solution, utilizing a Mössbauer source, to perform time-resolved nuclear scattering, to produce suitable pulses for photon storage, and to flexibly generate x-ray single-photon entanglement.