You don't need them to be infinite, because they will get clipped at some point no matter what (clipping planes doing their jobs and all...)
If you are talking about an effect similar to a skybox where it is "infinitely" far away, then you just need to set the zbuffer calculation to always behind when drawing the lines so they ...