Of course the Nazi leadership — Hitler, Goring, Himmler, Heydrich, Rosenberg, etc. — was largely responsible for conceiving of the Holocaust and its execution, along with the other crimes against humanity committed by the Third Reich. But how involved were the German generals in these crimes? I believe they did not reach their positions because of a commitment to Nazi ideology, but rather based on merit or plain old nepotism. Although, I suppose this raises the tangential question: To what extent did Hitler reform the general staff upon seizing power, and on what grounds did he do this? In any case, I know Rommel plotted against Hitler, and was forced to kill himself as a result. Other officers in the military tried to assassinate Hitler, too. So how committed to Nazism were Germany's generals? And to what extent did the general staff participate in the planning and execution of the crimes committed by the Third Reich?
The German military leadership was directly involved in planning the war and the accompanying policies of mass murder and genocide. The German High Command (OKW) issued several orders (particularly on the Eastern Front) which they knew violated international law governing warfare and the treatment of civilian populations and prisoners of war. The generals in the field passed these orders along to the units under their command, making them responsible for their implementation (although some later falsely claimed that they didn't pass them on).
This includes four particularly notable orders, often grouped together as the "criminal orders". The first was Barbarossa Decree, issued by Field Marshall Wilhelm Keitel in May 1941, which explicitly stated that the coming invasion of the Soviet Union was a war of racial and ideological annihilation and that German soldiers had a responsibility to execute anyone suspected of sabotage or other acts of opposition to German occupation (and permission to apply collective responsibility for such acts).
The second was the Commissar Order, authored by General Eugen Müller and issued in June 1941, which called for the immediate separation and execution of Soviet political commissars and Jewish Red Army personnel captured by the Wehrmacht. This practice (known euphemistically as Aussonderung, "weeding out") deliberately flouted the Geneva Convention and was widespread across the Eastern Front, resulting in tens of thousands of deaths; many of the political commissars and Jews who weren't "weeded out" and made it to German POW camps were later sent to concentration camps and executed, demonstrating direct relationships between the Wehrmacht and the SS. In addition, the German camps for Soviet prisoners of war were horrendous; millions of prisoners were deliberately starved to death or allowed to die from disease because the Germans didn't provide medical care. Of the 5.7 million Soviet POWs captured by the Germans, 3.3 million (58%) died in captivity, more than 2 million of them in the first year of the war.
The third was the Severity Order, issued by Field Marshall Walther von Reichenau in October 1941, which explicitly instructed German soldiers to ignore the laws of war and kill Jews and Soviet civilians under the guise of fighting "partisans". This order endorsed Wehrmacht participation in mass murder of the Jews in the Soviet Union, which some German commanders later tried to falsely claim was solely carried out by the Einsatzgruppen.
Finally, there was the Commando Order, which was issued by Field Marshall Gerd von Rundstedt in July 1942 (later modified in October 1942), which prescribed the execution of all captured Allied commandos, whether armed or unarmed.
These orders were introduced as evidence against the generals who were tried during the International Military Tribunal and the High Command Trial at Nuremberg. Two members of the OKW, Keitel and Colonel General Alfred Jodl, were executed for war crimes.
Many generals who survived the war later wrote books and memoirs which either sanitized their participation in the war by ignoring the non-operational aspects of the war (e.g., Heinz Guderian) or explicitly denied Wehrmacht involvement in war crimes and placed the blame solely on Hitler (Franz Halder). These memoirs often tried to paint the Wehrmacht leadership as apolitical or even opposed to Hitler and Nazism, which it unquestionably was not. As the above examples show, the Wehrmacht was actively involved in planning and deliberately carrying out war crimes as part of an explicitly acknowledged war of conquest and racial extermination. Their degree of political support for Hitler and ideological commitment to Nazism varied, but regardless of their personal attitudes, the most significant thing is that they went along with (or actively participated in) the planning and commission of war crimes based on Nazi ideological prescriptions.
If you want to read more, there are a few good sources (I'll only list the English-language ones for convenience, but if you read German and want to know more, I can make some recommendations for German publications as well):
Geoffrey Megargee, Inside Hitler's High Command (UP of Kansas, 2000) [disclosure: he was my direct supervisor from 2016-2019]
David Stahel, Operation Barbarossa and Germany's Defeat in the East (Cambridge UP, 2009)
Alex J. Kay, Jeff Rutherford, David Stahel, eds., Nazi Policy on the Eastern Front, 1941: Total War, Genocide, and Radicalization (U of Rochester Press, 2012) [Felix Römer's essay in this book is of particular note]
Christian Hartmann, Operation Barbarossa: Hitler's War of Extermination in the East, 1941-1945 (Oxford UP, 2013)