you can buy power cords all day long at places like Goodwill, for practically nothing. Then you can cut and splice them back together at whatever length you need. A little electrical tape or shrink tubing from Harbor freight makes the splice look reasonably good.

But since your rack is made of scrap 2x4's, I think you should use duct tape to complete the redneck motif. LOL