Specifying /var/run/user/<userid> for log files

As I understand it, /var/run/user/ is the place to put log files now rather than in /tmp. What is the appropriate way to do that in home-manager home.nix? What about configuration.nix?

I’ve never heard that one should put log files into ephemeral locations that might be deleted without notice.

Logs belong into a place that is permanent.

I mean log in the sense of “I want to collect the output of running this command without seeing it on the command line”. I’m not collecting operating system logs.

Having said that, is there an attribute for /var/run/user/? Alternatively, is there an attribute for so I can synthesize the path?