anchor.diff:            }
           ];
   
  -        preStart = let
  -          createBotsScript = pkgs.runCommandLocal "ASF-bots" {} ''
  -            mkdir -p $out
  -            # clean potential removed bots
  -            rm -rf $out/*.json
  -            for i in ${strings.concatStringsSep " " (lists.map (x: "${getName x},${x}") (attrsets.mapAttrsToList mkBot cfg.bots))}; do IFS=",";
  -              set -- $i
  -              ln -fs $2 $out/$1
  -            done
  +        preStart =
  +          let
  +            createBotsScript = pkgs.runCommandLocal "ASF-bots" { } ''
  +              mkdir -p $out
  +              # clean potential removed bots
  +              rm -rf $out/*.json
  +              for i in ${strings.concatStringsSep " " (lists.map (x: "${getName x},${x}") (attrsets.mapAttrsToList mkBot cfg.bots))}; do IFS=",";
  +                set -- $i
  +                ln -fs $2 $out/$1
  +              done
  +            '';
  +            replaceSecretBin = "${pkgs.replace-secret}/bin/replace-secret";
  +          in
  +          ''
  +            mkdir -p config
  +
  +            cp --no-preserve=mode ${asf-config} config/ASF.json
  +            ${replaceSecretBin} '#ipcPassword#' '${cfg.ipcPasswordFile}' config/ASF.json
  +
  +            ${optionalString (cfg.ipcSettings != {}) ''
  +              ln -fs ${ipc-config} config/IPC.config
  +            ''}
  +
  +            ${optionalString (cfg.ipcSettings != {}) ''
  +              ln -fs ${createBotsScript}/* config/
  +            ''}
  +
  +            rm -f www
  +            ${optionalString cfg.web-ui.enable ''
  +              ln -s ${cfg.web-ui.package}/lib/dist www
  +            ''}
             '';
  -          replaceSecretBin = "${pkgs.replace-secret}/bin/replace-secret";
  -        in ''
  -          mkdir -p config
  -
  -          cp --no-preserve=mode ${asf-config} config/ASF.json
  -          ${replaceSecretBin} '#ipcPassword#' '${cfg.ipcPasswordFile}' config/ASF.json
  -
  -          ${optionalString (cfg.ipcSettings != {}) ''
  -            ln -fs ${ipc-config} config/IPC.config
  -          ''}
  -
  -          ${optionalString (cfg.ipcSettings != {}) ''
  -            ln -fs ${createBotsScript}/* config/
  -          ''}
  -
  -          rm -f www
  -          ${optionalString cfg.web-ui.enable ''
  -            ln -s ${cfg.web-ui.package}/lib/dist www
  -          ''}
  -        '';
         };
       };
     };
  
positive.code:             Group = "asf";
              WorkingDirectory = cfg.dataDir;
              Type = "simple";
              ExecStart =
                "${cfg.package}/bin/ArchiSteamFarm --path ${cfg.dataDir} --process-required --no-restart --service --no-config-migrate";
  
              # mostly copied from the default systemd service
              PrivateTmp = true;
  
negative.code:           };
            settings = mkOption {
              type = types.attrs;
              description = "Additional settings that are documented <link xlink:href=\"https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Configuration#bot-config\">here</link>.";
              default = { };
            };
          };
  