anchor.diff:              mkdir -p config
   
               cp --no-preserve=mode ${asf-config} config/ASF.json
  -            ${replaceSecretBin} '#ipcPassword#' '${cfg.ipcPasswordFile}' config/ASF.json
  +
  +            ${optionalString (cfg.ipcPasswordFile != null) ''
  +              ${replaceSecretBin} '#ipcPassword#' '${cfg.ipcPasswordFile}' config/ASF.json
  +            ''}
   
               ${optionalString (cfg.ipcSettings != {}) ''
                 ln -fs ${ipc-config} config/IPC.config
  
positive.code:     # is in theory not needed as this is already the default for default builds
      UpdateChannel = 0;
      Headless = true;
    } // lib.optionalAttrs (cfg.ipcPasswordFile != "") {
      IPCPassword = "#ipcPassword#";
    });
  
  
negative.code:     };
  
      ipcPasswordFile = mkOption {
        type = types.nullOr types.path;
        default = null;
        description = "Path to a file containig the password. The file must be readable by the <literal>asf</literal> user/group.";
      };
  
  