You probably wanted:
${pkgs.systemd}/bin/systemctl --user restart docker.service
There’s probably a better way to achieve what you want by changing thr service’s restart triggers, though. Presumably you just modified something that isn’t detected by the module as a change to the service.