diff --git a/machines/gerd/services/nextcloud.nix b/machines/gerd/services/nextcloud.nix index 7c205a0..61ce324 100644 --- a/machines/gerd/services/nextcloud.nix +++ b/machines/gerd/services/nextcloud.nix @@ -3,6 +3,8 @@ let svc_domain = "nextcloud.${config.mine.shared.settings.domain}"; + default_storage_quota = "100MB"; + # place data into own zfs dataset stateDir = config.mine.zfsMounts."rpool/safe/svcs/nextcloud"; @@ -91,6 +93,13 @@ let echo "Ensuring everything is encrypted!" printf "y\n" | ${occ} encryption:encrypt-all + + # script for setting up tho storage quota + # possible to set based on groups + # https://github.com/nextcloud/groupquota + nextcloudSetupStorageQuota = pkgs.writeShellScript "nextcloud-setup-storage-quota.sh" '' + # set default quota + ${occ} config:app:set files default_quota --value '${default_storage_quota}' ''; in { services.nextcloud = { @@ -150,6 +159,7 @@ in { ${nextcloudSetupLdap} ${nextcloudSetupAdmin} ${nextcloudSetupEncryption} + ${nextcloudSetupStorageQuota} ''; # setup credentials for service