Support DNF variables in repository artifact

I tried using Packit's Testing Farm integration with a package that needs a third party repository. To make that work, I added

  - job: tests
    trigger: pull_request
    targets:
      rhel-9-x86_64:
        distros:
          - centos-stream-9
    tf_extra_params:
      environments:
        - artifacts:
            - type: repository
              id: https://yum.theforeman.org/releases/nightly/el9/x86_64/
              packages:
                - foreman-release

This works, but you may notice that the tf_extra_params is on the top level. So if I add EL 8 to the mix, it will fail. What I would like is to specify the repository with DNF variables: https://yum.theforeman.org/releases/nightly/el$releasever/$basearch/.

I tried this, but couldn't make it work. Perhaps if I escape things, but that feels like a hack.

For reference, this is where I'm experimenting: https://github.com/theforeman/foreman_maintain/pull/818