anchor.diff:          NIX_OTHER_STORES = "/run/nix/remote-stores/*/nix";
         }
   
  -      // optionalAttrs cfg.distributedBuilds {
  -        NIX_BUILD_HOOK =
  -          if isNix112 then
  -            "${nix}/libexec/nix/build-remote"
  -          else
  -            "${nix}/libexec/nix/build-remote.pl";
  +      // optionalAttrs (cfg.distributedBuilds && !isNix20) {
  +        NIX_BUILD_HOOK = "${nix}/libexec/nix/build-remote.pl";
         };
   
       # Set up the environment variables for running Nix.
  
positive.code:       { NIX_PATH = concatStringsSep ":" cfg.nixPath;
        };
  
      environment.extraInit =
        ''
          # Set up secure multi-user builds: non-root users build through the
          # Nix daemon.
  
negative.code:     systemd.sockets.nix-daemon.wantedBy = [ "sockets.target" ];
  
      systemd.services.nix-daemon =
        { path = [ nix pkgs.utillinux ]
            ++ optionals cfg.distributedBuilds [ config.programs.ssh.package pkgs.gzip ]
            ++ optionals (!isNix20) [ pkgs.openssl.bin ];
  
          environment = cfg.envVars
            // { CURL_CA_BUNDLE = "/etc/ssl/certs/ca-certificates.crt"; }
  