Error creating TOML in ntpd-rs - [[SOURCE]]

I’m looking at using ntpd-rs to sync time. An example TOML config could be:

[[source]]
mode = “pool”
address = “ntpd-rs.pool.ntp.org
count = 4

If I use:

settings = {
source = {
mode = “pool”;
address = “ntpd-rs.pool.ntp.org”;
};
};

The resulting TOML file contains:

[SOURCE]

How do I set the file to [[ rather than [ ?

Later edit - there seems to be some “generators” which maybe what is going on here. But I can’t find any documentation on that to help…

this is what you’re looking for

{
  source = [
    {
      address = "ntpd-rs.pool.ntp.org";
      mode = "pool";
    }
  ];
}
1 Like

Many thanks! Just what I needed…