anchor.diff:        # even shortly after the previous lookup. This *also* applies to the daemon.
         narinfo-cache-negative-ttl = 0
       '';
  -    nix.package = mkIf cfg.patchNix patchedNix;
       services.hercules-ci-agent.tomlFile =
         format.generate "hercules-ci-agent.toml" cfg.settings;
     };
  
positive.code:       configurePhase = ":";
        buildPhase = ''
          echo "Checking in-memory pathInfoCache expiry"
          if ! grep 'struct PathInfoCacheValue' src/libstore/store-api.hh >/dev/null; then
            cat 1>&2 <<EOF
  
            You are deploying Hercules CI Agent on a system with an incompatible
            nix-daemon. Please
             - either upgrade Nix to version 2.4.0 (when released),
             - or set option services.hercules-ci-agent.patchNix = true;
             - or set option nix.package to a build of Nix 2.3 with this patch applied:
                 https://github.com/NixOS/nix/pull/3405
  
            The patch is required for Nix-daemon clients that expect a change in binary
            cache contents while running, like the agent's evaluator. Without it, import
            from derivation will fail if your cluster has more than one machine.
            We are conservative with changes to the overall system, which is why we
            keep changes to a minimum and why we ask for confirmation in the form of
            services.hercules-ci-agent.patchNix = true before applying.
  
          EOF
            exit 1
          fi
  
negative.code:         continuous integation service that is centered around Nix.
  
          Support is available at <link xlink:href="mailto:help@hercules-ci.com">help@hercules-ci.com</link>.
        '';
      };
      checkNix = mkOption {
  