Both, because they are difficult to separate. Humans are also social creatures. Newborn babies respond favorably with lower heart and respiration rates to having people nearby. Genes and environment work together and are not easy to separate. In contrast with the above case, the arrow can also go the other way, with the environment influencing which genes are expressed in a creature, and to what degree.
Every organism has a unique genetic code, called the genotype.
The physical attributes we observe in a creature make up what is called the phenotype, and the environment plays a big role in determining how the genotype will be expressed as a phenotype. A simple example here is the fact that height, a largely heritable trait, has been steadily increasing in humans over the past few centuries. Presumably this is due to better nutrition since it is too short a time span for evolutionary changes in gene frequency to have occurred. So your height is a combination of your genes and various external factors. They are not separate.