Which project file holds the Arduino setting for flash size?

boards.txt in hardware/arduino/avr in the distribution I think. look for 'maximum_size'. I've clone a set of entries in the past in order to vary one of the settings - keep a copy of the original boards.txt safe of course(!)

(Actually it probably won't be the avr directory, thinking about it...)

I wish there was a way to specify which board at the top of the sketch sometimes (or maybe
that exists now, I don't have the latest version)