This cannot be done in the hydra-evaluator systemd unit, since then every other Nix process (e.g. hydra-evaluator and nix-prefetch-*) will also allocate the specified heap size, probably leading to OOM.