This is rapidly becoming standard practice in container-land- a program which provides Environment for another. This should be supported directly in systemd, rather than requiring each project to cobble together their own executable wrapper. Programs doing this themselves: https://github.com/kelseyhightower/confd https://github.com/hashicorp/envconsul https://github.com/mattn/etcdenv https://github.com/GoogleCloudPlatform/kubernetes/issues/2068 The actual format suggested- an EnvironmentExecutable- is completely negotiable, it merely seemed to be the simplest option to me. Far more interestingly, perhaps an EnvironmentOneshot could specify a oneshot service whose stdout could be used. This would, to me, be far more complete, as it solves the question of what execution environment to frame the execution environment generator in and allows for all the levels of stupidly recursive one could ever dream.
Also, I would definitely appreciate if specifiers were parsed in. Related, 'Parse specifiers in EnvironmentFiles as well': https://bugs.freedesktop.org/show_bug.cgi?id=62523
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.