Can't configure external SMB storage with user variable

I have an odd hurdle here. I want to configure SMB external storage for all users where the folder name is / so it appears as the root folder for all users. Effectively this becomes their “home” folder, replacing access to the normal primary storage. I used this approach; Allow using '/' as external storage mountpoint by icewind1991 · Pull Request #3438 · nextcloud/server · GitHub

That works. However.

The problem is that all users see the same root folder on the external SMB storage. So, what I’d like to do instead is use the $user variable as documented here; Configuring External Storage (GUI) — Nextcloud latest Administration Manual latest documentation in my SMB configuration, but it does not work.

I have tried the following;

  • Share: nextcloud-homes/$user
  • Share: nextcloud-homes/$user/
  • Share: nextcloud-homes$user
  • Share: nextcloud-homes$user\
  • Remote subfolder: $user
  • Remote subfolder: $user/
  • Remote subfolder: $user\
  • Remote subfolder: /$user
  • Remote subfolder: /$user/
  • Remote subfolder: $user
  • Remote subfolder: $user\

Every time I get the red exclamation point instead of the green checkmark. If I remove the $user variable from the configuration then I get a green checkmark, so I know the rest of my config is fine.

Is the $user variable just not supported for SMB external storage configurations?

Based on this comment in github, it should be possible…

Does anyone know why this might not be working?