···3030 }
3131 trap 'on_exit' INT TERM QUIT EXIT
32323333- archiveName="${cfg.archiveBaseName}-$(date ${cfg.dateFormat})"
3333+ archiveName="${if cfg.archiveBaseName == null then "" else cfg.archiveBaseName + "-"}$(date ${cfg.dateFormat})"
3434 archiveSuffix="${optionalString cfg.appendFailedSuffix ".failed"}"
3535 ${cfg.preHook}
3636 '' + optionalString cfg.doInit ''
···6060 '' + optionalString (cfg.prune.keep != { }) ''
6161 borg prune $extraArgs \
6262 ${mkKeepArgs cfg} \
6363- --prefix ${escapeShellArg cfg.prune.prefix} \
6363+ ${optionalString (cfg.prune.prefix != null) "--prefix ${escapeShellArg cfg.prune.prefix} \\"}
6464 $extraPruneArgs
6565 ${cfg.postPrune}
6666 '';
···284284 };
285285286286 archiveBaseName = mkOption {
287287- type = types.strMatching "[^/{}]+";
287287+ type = types.nullOr (types.strMatching "[^/{}]+");
288288 default = "${globalConfig.networking.hostName}-${name}";
289289 defaultText = literalExpression ''"''${config.networking.hostName}-<name>"'';
290290 description = ''
···292292 determined by <option>dateFormat</option>, will be appended. The full
293293 name can be modified at runtime (<literal>$archiveName</literal>).
294294 Placeholders like <literal>{hostname}</literal> must not be used.
295295+ Use <literal>null</literal> for no base name.
295296 '';
296297 };
297298···471472 };
472473473474 prune.prefix = mkOption {
474474- type = types.str;
475475+ type = types.nullOr (types.str);
475476 description = ''
476477 Only consider archive names starting with this prefix for pruning.
477478 By default, only archives created by this job are considered.
478478- Use <literal>""</literal> to consider all archives.
479479+ Use <literal>""</literal> or <literal>null</literal> to consider all archives.
479480 '';
480481 default = config.archiveBaseName;
481482 defaultText = literalExpression "archiveBaseName";