anchor.diff:          }
         ]
   
  -      ++ optional (config.nix.distributedBuilds && !config.nix.manualNixMachines)
  +      ++ optional (cfg.distributedBuilds && !cfg.manualNixMachines)
           { # List of machines for distributed Nix builds in the format expected
             # by build-remote.pl.
             source = pkgs.writeText "nix.machines"
  
positive.code:               + " ${machine.sshKey} ${toString machine.maxJobs} "
                + (if machine ? speedFactor then toString machine.speedFactor else "1" )
                + "\n"
              ) config.nix.buildMachines));
            target = "nix.machines";
          };
  
      jobs.nixDaemon =
        { name = "nix-daemon";
  
          startOn = "startup";
  
          path = [ nix pkgs.openssl pkgs.utillinux ]
            ++ optionals config.nix.distributedBuilds [ pkgs.openssh pkgs.gzip ];
  
          script =
            ''
              ${config.nix.envVars}
              exec \
                nice -n ${builtins.toString config.nix.daemonNiceLevel} \
                ionice -n ${builtins.toString config.nix.daemonIONiceLevel} \
                nix-worker --daemon > /dev/null 2>&1
            '';
  
          extraConfig =
            ''
              limit nofile 4096 4096
            '';
        };
  
      environment.shellInit =
        ''
          # Set up the environment variables for running Nix.
          ${config.nix.envVars}
  
          # Set up secure multi-user builds: non-root users build through the
          # Nix daemon.
  
negative.code:         fi
        '';
  
      users.extraUsers = map makeNixBuildUser (range 1 cfg.nrBuildUsers);
  
      system.activationScripts.nix = stringAfter [ "etc" "users" ]
        ''
  