From ef5a62f7011e4544b63cb09b9725be069b71ec66 Mon Sep 17 00:00:00 2001 From: eyjhb Date: Thu, 15 Aug 2024 11:12:09 +0200 Subject: [PATCH] gerd.nextcloud: only encrypt-all one time, not every time. --- machines/gerd/services/nextcloud.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/machines/gerd/services/nextcloud.nix b/machines/gerd/services/nextcloud.nix index 61ce324..db0afbb 100644 --- a/machines/gerd/services/nextcloud.nix +++ b/machines/gerd/services/nextcloud.nix @@ -92,7 +92,14 @@ let ${occ} encryption:enable echo "Ensuring everything is encrypted!" - printf "y\n" | ${occ} encryption:encrypt-all + if [[ ! -e ${stateDir}/.encrypt-setup ]]; then + echo "Running encrypt-all!" + printf "y\n" | ${occ} encryption:encrypt-all + touch ${stateDir}/.encrypt-setup + else + echo "Encrypt all has already ran, not running again." + fi + ''; # script for setting up tho storage quota # possible to set based on groups