this fixes the issue when using
nixos-rebuild switch --target-host <target> --use-remote-sudo
when the local machine does not have anything in `$PATH` that would
resolve to `sudo` on the remote machine.
the single quotes prevent expansion of `$PATH` on the local machine,
such that the remote machine's value of that variable is used.
The use of systemctl makes this incompatible with darwin even though
building/deploying a nixos closure from darwin is a perfectly valid use case.
NIX_DAEMON is pretty much unnecessary nowadays as nix uses other
indicators for deciding whether to use the daemon or not.