The NixOS option for tmpfiles.d can be found here: NixOS Search
For the syntax the manpages are great at explaining it.
Another example with putting python
in /usr/libexec
: How to install all pre-requisites for ansible to run on a NixOS system? - #2 by robsliwi
Does this help to get you started?