This was though a nice hack but the needles being used in the machine might losen the lid. There are lids available that are cut in the shape of pods and come with adhesive to stick properly. Here is something more to know and discover...https://www.friedcoffee.com/best-nespresso-refillable-capsules/
It obviously a good suggestion to make espresso at home and save some bucks and it's pretty simple to make a basic cup of espresso at home if you have a nice machine. For $1200, you can get a pretty much good machine like Rancilio, Breville or even a Jura (Super Espresso). Here is a list of top espresso machines that are worth to look for.
I would suggest to go with Ethiopian Yirgacheffe and Hawaiian Kona....try these beans as they are considered as the best all over. Here are a few more http://www.friedcoffee.com/which-are-the-best-coffee-beans-to-buy/ . Hope this helps to get the best beans home.