Q:

systemd.network(5) get a value from file, or environment?

I know that *.service units support Environment=key=val and EnvironmentFile=fname entries, but it appears that *.network files don't.
Is there any other way of getting, the value of an Address specifically, in from a different file or environment variable?
e.g. the result would be like:
# /etc/some/conf
192.0.2.3

# some.network
[Match]
Name=some

[Network]
# (! invalid !) example of desired effect
Address=$(cat /etc/some/conf)

A:

Systemd-networkd does not support loading data from external files (at least until February 2020 with systemd 244), so the best thing you can do is to write a .service file that syncs the key either way, and add RequiredBy=systemd-networkd.service and Before=systemd-networkd.service to make sure it does the job at the right time.

