you speak towards environment as a selective pressure, which of course it is. The result of such pressure at some point is measurable genetically as a change in the frequency of alleles.
So yes, environment, in that sense, influences genetics.
Genetic analysis of individuals and populations on the other hand is done from the other direction. One observes a phenotype in an individual and has genetic information based on parents and ten asks: can I explain the phenotype strictly in terms of genetics (blue eyes brown eyes) mostly in terms of genetics (Huntingotn's Chorea) or not by genetics at all (a bleeding heart liberal).
Efforts to find liberal and blue-eye parents show that genetics can define blue-eyed offsrping with remarkable regularity, and not so good on liberalism.
We can seek to control for a liberal environment by measuring liberalism in adopted child studies, and any variety of other things whee the environment has been effectively randomized while the genetics are presumably rather fixed, fixed based on parentage.
This is false. The genetics are remarkable plastic post-parentage. The assignemnt of blue eyes and liberalism as traits the were largely genetically or not genetically determined relied on the belief that gamete production was largely genetically static, with errors in the 19e-9 range (per nt).
We know this to be false, but know this only recently. The whole pile of traits designated as not being genetically determined must come under reconsideration. Post-parent genetic plasticity is much more than ever imagined.