I doubt it lasts indefinitely
It's more or less the same technology as a laptop battery and those don't last forever.
Admittedly battery technology is advancing fast though.
Probably the state of the art in lithium batteries are electric car batteries these days. I was vaguely interested in the BMW i3 a while ago, I think they quoted 15 yrs or something? But the actual thing to think about is the deterioration in capacity as the number of cycles increases.
This whole subject is going to become more and more relevant, so I suppose we should all spend some time learning more about it.
For example when buying an electric car, one is essentially just buying the battery, so understanding the state of that battery and being able to evaluate it's condition, and compare that to other similar cars is going to be important.
The same is equally true for a home solar system, I think.