After searching all around for the correct flavor name to build a terminal-only whonix-gateway I found at least a flag (--terminal-only). Though I still haven’t found it in the official documentation.
I tried to append it as a flavor to the template name in Qubes builder’s builder.conf: whonix-gateway+terminal-only. Unsurprisingly that didn’t work. (whonix-gateway seems to work fine.)
Is it at all possible to build a terminal-only whonix-gateway template in Qubes builder? If yes, how?
[ That switch is broken. That switch won’t work anyhow, since Qubes builder is no longer using Whonix’s build script. That switch would be useless, since Qubes is terminal-only anyhow. No desktop environment packages / display manager get installed in Qubes-Whonix. What you might want instead is no-default-apps switch, but the same applies. ]
if [ "${TEMPLATE_FLAVOR}" = "whonix-gateway" ]; then
aptInstall qubes-whonix-gateway
elif [ "${TEMPLATE_FLAVOR}" = "whonix-workstation" ]; then
aptInstall qubes-whonix-workstation
Installing different meta packages.
(See anon-meta-packages/control at master · Whonix/anon-meta-packages · GitHub and look for Package: qubes-whonix-gateway to see the package declaration. You then could use aptInstall multiple times. Here is what I would try (which means this is untested) for a no-default-apps Qubes-Whonix-Gateway.)
Replace aptInstall qubes-whonix-gateway with the following.