How do I create a rule that closes comments on node after 30 days?
You need at least 2 rules to make this happen. One is an actual "rule" and the other is a "rule component".

You are correct about the second one being a component which sets the data value on node:comment.

The other one, the rule, needs to be set to activate on the event "After saving new content."

An action for this rule needs to be "Schedule component evaluation". Setting this action then requires you to configure the evaluation, where you set the particular rule component to be evaluated, and then set "Scheduled Evaluation Date" as well.

To make it happen 30 days in the future, enable Data Selection mode, and select "site:current-date", then for the offset field which now appears below it, select 30 days. This will cause your selected rule component to be evaluated 30 days from the current date/time.

After configuring all this and testing it, you can check to see if it works by going back to the Rules interface and going to the "Schedule" tab. Your scheduled task will be listed there.