How to set environment variables for Hass.io

Hello. How can one set an environment variable that can be read by an addon when running hass.io?

As I understand it, an addon in hass.io is a Docker container with something running in it. On a regular system running Docker you could use the “environment:” section in your Docker file to inject environment variables into the container. How to do the same in Hass.io?

Also; are any environment variables in hass.io passed on to the addons? Can environment variables be set in hass.io and then all passed on to all addons?

The specific issue I am trying to solve involves the Frigate NVR addon. It supports a specific set of environment variables that can contain usernames and password. These I would not like to have in cleartext in the Frigate configuration, but rather read from environment variables. But how to set those?

Thanks

bump! Did anyone figure this out yet? I tried putting it into the options.json of the addon subdir but next time i start the add-on the value dissappears so options.json is being recreated by something.

what is that something and how do i get it to add an environment variable in there ??