Copying directories from the nix store into a NixOS build

I have some directories I’m trying to make available inside a NixOS container. I thought I could use systemd.tmpfiles.rules with the C+ type, but I can’t figure out how to set the permissions to their appropriate settings recursively. Since the files are from the nix store, they get their write permissions removed, and all I want to do is bring those back. To the best of my knowledge, systemd-tmpfiles is incapable of doing this in a general why like chmod. What is the recommended way to accomplish this?

The best option I have figured out so far is to use system.activationScripts, with a script that just copies everything over and then uses chown and chmod.

I had a similar problem this week too, and ended up doing some little systemd service to setup the files.