anchor.diff:  
   let
     cfg = config.services.factorio;
  -  factorio = pkgs.factorio-headless;
     name = "Factorio";
     stateDir = "/var/lib/${cfg.stateDirName}";
     mkSavePath = name: "${stateDir}/saves/${name}.zip";
     configFile = pkgs.writeText "factorio.conf" ''
       use-system-read-write-data-directories=true
       [path]
  -    read-data=${factorio}/share/factorio/data
  +    read-data=${cfg.package}/share/factorio/data
       write-data=${stateDir}
     '';
     serverSettings = {
  
positive.code:         StateDirectory = cfg.stateDirName;
          UMask = "0007";
          ExecStart = toString [
            "${factorio}/bin/factorio"
            "--config=${cfg.configFile}"
            "--port=${toString cfg.port}"
            "--start-server=${mkSavePath cfg.saveName}"
  
negative.code:     only_admins_can_pause_the_game = true;
      autosave_only_on_server = true;
      admins = [];
    } // cfg.extraSettings;
    serverSettingsFile = pkgs.writeText "server-settings.json" (builtins.toJSON (filterAttrsRecursive (n: v: v != null) serverSettings));
    modDir = pkgs.factorio-utils.mkModDirDrv cfg.mods;
  in
  