We performed computer modelling of a fast electrical discharge in a nitrogen-filled alumina capillary in order to discover discharge system parameters that may lead to efficient recombination pumping of soft X-ray laser with active medium created by H-like nitrogen ions. The space-time dependences of pinch plasma quantities were found by means of a one-dimensional MHD code. Time dependences of populations of all ionisation states and populations of selected energy levels of lithium-, helium- and hydrogen-like nitrogen ions were evaluated using the FLY code as a post-processor. The population inversion was found at the quantum transition corresponding to the Balmer α-line of N6+ ions and the resulting gain factor was evaluated for different capillary radii, initial pressure, electric current peaks and periods. A gain factor of 1 cm−1 spanning the time interval of 1 ns was found for an optimised arrangement with capillary radius 1.5 mm, peak current 50 kA, quarter period 40 ns and filling gas pressure 0.5 kPa. It is pointed out that even higher values of the gain factor may be achieved with thinner capillaries and shorter current pulses, e.g. a gain factor of 6 cm−1 is achieved if the capillary radius is 0.5 mm, peak current 56 kA, quarter period 15 ns, and filling nitrogen pressure 3.9 kPa.