How is nixos_site_settings.json file used in NixOS configuration for Discourse?

Hi Everybody,

I’m trying to Nixify my Discourse currently running inside Docker and I’m looking into Discourse NixOS module and derivation.

One thing that I can’t figure out is how is nixos_site_settings.json

file used/applied. I’m looking at the actual shell script that is in ExecStartPre of discourse.service:

/nix/store/9rxqymz0cb33lix6l2vwhhy0rkjfv4dv-jq-1.7.1-bin/bin/jq >'/run/discourse/config/nixos_site_settings.json' '.' <<'EOF'
{"basic":{"allow_user_locale":true},"email":{"manual_polling_enabled":true,"reply_by_email_address":"%{reply_key}@example.com","reply_by_email_enabled":true},"required":{"contact_email":"discourse@example.com","notification_email":"discourse@example.com","site_description":"example.com Discourse","title":"example.com Discourse"},"security":{"force_https":false}}
EOF

and I don’t see that file to be used by NixOS or by Discourse. I looked into my Docker Discourse and I didn’t find any *.json files like this and I searched for nixos_site_settings.json in Nixpkgs and I didn’t find anything interesting

Is nixos_site_settings.json unused or is it somehow used and I don’t understand it?

Thank you.

B.