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