An historic farm, that previously featured on BBC's Countryfile, has secured £2.5 million funding for a new "community hub".