You are not supposed to edit the config _inside i3config_ but to configure the _path to i3xrocks config file_
set $i3xrocks_config ~/.config/regolith/i3xrocks.config
you may first copy the original to the path of your choice, for instance
cp /etc/regolith/i3xrocks/config ~/.config/regolith/i3xrocks.config
When using the customized file for the first time you have to restart i3. After that a config reload via