gerd.nextcloud: set default storage quota
This commit is contained in:
parent
e84742d942
commit
21c34bc554
1 changed files with 10 additions and 0 deletions
|
@ -3,6 +3,8 @@
|
||||||
let
|
let
|
||||||
svc_domain = "nextcloud.${config.mine.shared.settings.domain}";
|
svc_domain = "nextcloud.${config.mine.shared.settings.domain}";
|
||||||
|
|
||||||
|
default_storage_quota = "100MB";
|
||||||
|
|
||||||
# place data into own zfs dataset
|
# place data into own zfs dataset
|
||||||
stateDir = config.mine.zfsMounts."rpool/safe/svcs/nextcloud";
|
stateDir = config.mine.zfsMounts."rpool/safe/svcs/nextcloud";
|
||||||
|
|
||||||
|
@ -91,6 +93,13 @@ let
|
||||||
|
|
||||||
echo "Ensuring everything is encrypted!"
|
echo "Ensuring everything is encrypted!"
|
||||||
printf "y\n" | ${occ} encryption:encrypt-all
|
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 {
|
in {
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
|
@ -150,6 +159,7 @@ in {
|
||||||
${nextcloudSetupLdap}
|
${nextcloudSetupLdap}
|
||||||
${nextcloudSetupAdmin}
|
${nextcloudSetupAdmin}
|
||||||
${nextcloudSetupEncryption}
|
${nextcloudSetupEncryption}
|
||||||
|
${nextcloudSetupStorageQuota}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# setup credentials for service
|
# setup credentials for service
|
||||||
|
|
Loading…
Reference in a new issue