Even if you're not close with your boss, chances are you have a working, first_name_basis relationship. Maintaining that in your official letter is okay. You don't need to keep a Victorian level of formality here__just make sure it's a professional tone.
How to write an excellent resignation letter. Whatever the language, the sentiment is the same: I'm outta here. However, as a professional person, you need to express that maturely and firmly__ideally, one that doesn't alienate anyone at the job you're leaving. I'm sure we all have that fantasy where we tell off everyone who wronged us on the way out the door, but that person in the fantasy/movie/TV show never seems to have to live with the consequences afterward.