Functional nanoporous polyamide aerogels