You should give at least two weeks, even knowing that it could be your last day. To mitigate that, be ready for it and have your FIRE plan ready to launch on the day you give notice.
That said, there's nothing wrong with giving them six months, so long as you're ready to deal with them letting you go right then and there. If you do though, know that you're giving them a pretty big commitment and be ready to deal with the frustration of working on projects in month four when you could just walk away instead.
Good luck!