Yes there are many ways of getting nitrogen out of air. I do not know if they are cheap and efficient on a small scale.
But nitrogen gas is very cheap, and can be bought readily. There is a large "down payment" as you pay for the tank, but when you either need a refill or a new tank and exchange the old empty tank, it is quite cheap.
But to make it yourself from air, look up the many ways of fractionation of air; and see if any apply to you. There are also of course, chemical reactions that produce nitrogen. But really, it is cheap to buy.