about summary refs log tree commit diff
path: root/nixos/modules/services/backup
diff options
context:
space:
mode:
authorFelix Bühler <Stunkymonkey@users.noreply.github.com>2023-07-22 13:02:47 +0200
committerGitHub <noreply@github.com>2023-07-22 13:02:47 +0200
commit0a2745684e8e97340d947d56b0ba778056c10395 (patch)
treec258179185eefafddef480949e84046d3bb50b2e /nixos/modules/services/backup
parent4448ec5cd84f00350969934deb4d9ac9055c411c (diff)
parente770737241360cdfd09b421eea83160dce02c212 (diff)
Merge pull request #239624 from Stunkymonkey/use-optionalString-then
treewide: use optionalString instead of 'then ""'
Diffstat (limited to 'nixos/modules/services/backup')
-rw-r--r--nixos/modules/services/backup/borgbackup.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/backup/borgbackup.nix b/nixos/modules/services/backup/borgbackup.nix
index 0da70112d48dd..3b44f097ab791 100644
--- a/nixos/modules/services/backup/borgbackup.nix
+++ b/nixos/modules/services/backup/borgbackup.nix
@@ -33,7 +33,7 @@ let
     }
     trap on_exit EXIT
 
-    archiveName="${if cfg.archiveBaseName == null then "" else cfg.archiveBaseName + "-"}$(date ${cfg.dateFormat})"
+    archiveName="${optionalString (cfg.archiveBaseName != null) (cfg.archiveBaseName + "-")}$(date ${cfg.dateFormat})"
     archiveSuffix="${optionalString cfg.appendFailedSuffix ".failed"}"
     ${cfg.preHook}
   '' + optionalString cfg.doInit ''