diff --git a/modules/backup.nix b/modules/backup.nix index 121eeac..bfd3df3 100644 --- a/modules/backup.nix +++ b/modules/backup.nix @@ -71,23 +71,12 @@ in DST=$(mktemp --suffix=.tar) echo "Archiving and compressing $SRC to $DST." ${cfg.compression.command} - '' - + ( - if cfg.encryption.command != null then - /* bash */ '' - # Archive encryption (optionnal) - SRC=$DST - DST=$(mktemp --suffix=.tar.encrypted) - echo "Encyphering $SRC to $DST." - '' - + cfg.encryption.command - + " - " - else - "" - ) - + /* bash */ '' + # Archive encryption (optionnal) + SRC=$DST + DST=$(mktemp --suffix=.tar.encrypted) + echo "Encyphering $SRC to $DST." + ${cfg.encryption.command} # Archive salvation SRC=$DST