From 92d0f25480a1c582bfedff0cfa7f5681291b0b72 Mon Sep 17 00:00:00 2001 From: boyreau Date: Mon, 17 Aug 2026 17:07:55 +0200 Subject: [PATCH] backup module script improvement --- modules/backup.nix | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) 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