I went through a similar train of thought a few years ago. I never hike at night on purpose, and I don't read or write after it gets dark. However, I've had more than one trip where it took a lot longer to finish a leg of the hike than planned, meaning I've had to set up camp and cook dinner by headlamp a few times. I think I'll always pack a hands-free method of lighting.

So, I've gone through 3 headlamps in the last 5 years, and they keep getting smaller. My current one is a Petzl e+lite. Now I'm considering switching to my keychain light. I think adding a patch of velcro would make it easy to attach to a hat brim.