It’s in the “filesystem” section, but I think it works on any string, not only paths. See the ugly duck example. I didn’t try it myself yet.
BTW the nu_scripts goodies are available in Nixpkgs, so since you are using Home Manager, it’s easy to integrate. Take a look at my config for starters: gitlab.com/tad-lispy/…/tad.nix#L39-47