Multiple plugin-specific configuration settings (for Telegraf)

I have the following settings snippet from telegraf.conf that I would like to define in configuration.nix:

[[inputs.procstat]]
  systemd_unit = "telegraf.service"

[[inputs.procstat]]
  systemd_unit = "influxdb.service"

I can do this for one systemd unit (with inputs.procstat.systemd_unit = "telegraf.service";), but how can I do that for more than one?

As a workaround, I defined a glob like this: inputs.procstat.pattern = "(bin/telegraf|grafana server|bin/influxd|bin/lightdm|bin/sshd|bin/signalk)";