Do you actually have mapped-devices declared in your operating-system declaration anywhere? Cause i think that's what that variable is referring to instead of it coming from a different module. I don't use mapped-devices myself so not sure, but i have something similar in my swap-device configuration:
(swap-devices (list
(swap-space
(target "/swapfile")
(dependencies (filter (file-system-mount-point-predicate "/")
file-systems)))))
In this snippet file-systems is referring to the file-systems field in my operating-system configuration, i think in your case it might be the same for mapped-devices.