As I also found this thread from a web search, I wanted to share a solution I found (open-vm-tools: Shared folders not working · Issue #46529 · NixOS/nixpkgs · GitHub):
Important bit:
fsType = "fuse./run/current-system/sw/bin/<fuse exec name>";
Note: the package must be added to environment.systemPackages
for this to work
The original example updated:
fileSystems."foo" = {
device = "foo";
mountPoint = "/foo";
fsType = "fuse./run/current-system/sw/bin/s3fs";
noCheck = true;
options = [ "_netdev" "ro" "allow_other" "use_path_request_style" "url=https://myobjectstore.com" "passwd_file=/root/.passwd-s3fs" "umask=0222" ];
};