diff options
author | Felix Buehler <account@buehler.rocks> | 2023-06-24 20:19:19 +0200 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2023-06-24 20:19:19 +0200 |
commit | f3719756b550113c1acbbab00c89a56fb77256f2 (patch) | |
tree | a94f6678f9b1b25c6773bdd7a35422aabc816032 /nixos/modules/services/backup | |
parent | e9e3f2e7362aba3ef709173d1777f0b893fc0ebf (diff) |
treewide: use optionalString instead of 'then ""'
Diffstat (limited to 'nixos/modules/services/backup')
-rw-r--r-- | nixos/modules/services/backup/borgbackup.nix | 2 |
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 '' |