This turned out to be easier than I thought it would, especially after struggling with Ubuntu.
Both procedures use a common debian.env file to hold environment variables applied in the script.
When installing Debian always be sure to select an apt mirror when prompted, if you don't you'll regret it.
In a file, debian.env: