Field listing pages in yaml config

I’m new to twig/yaml/grav so apologies if I’m going about this in the wrong way.

I want to specify a select list in a yaml file that is populated a list of all pages in the site.
I figure this should be possible by using the page collection objects.
e.g.
fields:
page:
type: select.select
label: Page
description: Page to retrieve content from
default: 1
options:
1: @root.descendants

My issue is I’m not sure if it’s possible to introduce this kind of logic into a yaml file, or if it is, what the correct method is.

Some extra background for this is I’m using the Gantry5 framework, and I want a content admin to be able to create pages, and then using the gantry5 ‘layout’ functionality, drag the particle i’m creating into an ‘outlines’ ‘position’. The particle yaml file is where the fields are specified that my question relates to.

Hope someone can point me in the right direction! Thank you.

Please try re-pasting your code between triple backticks like regular pre-code blocks in markdown. It’s impossible to debug a YAML file without the appropriate indentations.