diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-05-08 02:18:20 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-05-08 10:32:47 +0200 |
commit | c4216ddb8bedd0b75149c039bd5dc86c3d6a9b7f (patch) | |
tree | e417ef522e87200dbe81673e71591606411a7889 /modules/private/websites | |
parent | 65b715d7e4a47f00fe0fca6c4b0eaff19e874d38 (diff) | |
download | Nix-c4216ddb8bedd0b75149c039bd5dc86c3d6a9b7f.tar.gz Nix-c4216ddb8bedd0b75149c039bd5dc86c3d6a9b7f.tar.zst Nix-c4216ddb8bedd0b75149c039bd5dc86c3d6a9b7f.zip |
Upgrade nextcloud to 18
Diffstat (limited to 'modules/private/websites')
-rw-r--r-- | modules/private/websites/tools/cloud/default.nix | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/private/websites/tools/cloud/default.nix b/modules/private/websites/tools/cloud/default.nix index 3b6a871..e6f8ecb 100644 --- a/modules/private/websites/tools/cloud/default.nix +++ b/modules/private/websites/tools/cloud/default.nix | |||
@@ -79,8 +79,10 @@ in { | |||
79 | user = "wwwrun"; | 79 | user = "wwwrun"; |
80 | group = "wwwrun"; | 80 | group = "wwwrun"; |
81 | permissions = "0600"; | 81 | permissions = "0600"; |
82 | # This file is not actually included, see activationScript below | ||
82 | text = '' | 83 | text = '' |
83 | <?php | 84 | <?php |
85 | include('${nextcloud}/version.php'); | ||
84 | $CONFIG = array ( | 86 | $CONFIG = array ( |
85 | // FIXME: change this value when nextcloud starts getting slow | 87 | // FIXME: change this value when nextcloud starts getting slow |
86 | 'instanceid' => '${env.instance_id}1', | 88 | 'instanceid' => '${env.instance_id}1', |
@@ -88,7 +90,7 @@ in { | |||
88 | 'passwordsalt' => '${env.password_salt}', | 90 | 'passwordsalt' => '${env.password_salt}', |
89 | 'debug' => false, | 91 | 'debug' => false, |
90 | 'dbtype' => 'pgsql', | 92 | 'dbtype' => 'pgsql', |
91 | 'version' => '16.0.0.9', | 93 | 'version' => implode($OC_Version, '.'), |
92 | 'dbname' => '${env.postgresql.database}', | 94 | 'dbname' => '${env.postgresql.database}', |
93 | 'dbhost' => '${env.postgresql.socket}', | 95 | 'dbhost' => '${env.postgresql.socket}', |
94 | 'dbtableprefix' => 'oc_', | 96 | 'dbtableprefix' => 'oc_', |
@@ -139,8 +141,8 @@ in { | |||
139 | cd ${nextcloud} | 141 | cd ${nextcloud} |
140 | NEXTCLOUD_CONFIG_DIR="${nextcloud}/config" \ | 142 | NEXTCLOUD_CONFIG_DIR="${nextcloud}/config" \ |
141 | exec \ | 143 | exec \ |
142 | sudo -u wwwrun ${pkgs.php73}/bin/php \ | 144 | sudo -u wwwrun ${pkgs.php74}/bin/php \ |
143 | -c ${pkgs.php73}/etc/php.ini \ | 145 | -c ${pkgs.php74}/etc/php.ini \ |
144 | occ $* | 146 | occ $* |
145 | ''; | 147 | ''; |
146 | in [ occ ]; | 148 | in [ occ ]; |
@@ -156,7 +158,7 @@ in { | |||
156 | ${builtins.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v: | 158 | ${builtins.concatStringsSep "\n" (lib.attrsets.mapAttrsToList (n: v: |
157 | "install -D -m 0644 -o wwwrun -g wwwrun -T ${v} ${varDir}/config/${n}.json" | 159 | "install -D -m 0644 -o wwwrun -g wwwrun -T ${v} ${varDir}/config/${n}.json" |
158 | ) confs)} | 160 | ) confs)} |
159 | install -D -m 0600 -o wwwrun -g wwwrun -T /var/secrets/webapps/tools-nextcloud ${varDir}/config/config.php | 161 | #install -D -m 0600 -o wwwrun -g wwwrun -T /var/secrets/webapps/tools-nextcloud ${varDir}/config/config.php |
160 | ''; | 162 | ''; |
161 | }; | 163 | }; |
162 | # FIXME: add a warning when config.php changes | 164 | # FIXME: add a warning when config.php changes |
@@ -169,7 +171,7 @@ in { | |||
169 | user = "wwwrun"; | 171 | user = "wwwrun"; |
170 | group = "wwwrun"; | 172 | group = "wwwrun"; |
171 | settings = phpFpm.pool; | 173 | settings = phpFpm.pool; |
172 | phpPackage = pkgs.php73.withExtensions(e: pkgs.php73.enabledExtensions ++ [ e.redis e.apcu e.opcache ]); | 174 | phpPackage = pkgs.php74.withExtensions(e: pkgs.php74.enabledExtensions ++ [ e.redis e.apcu e.opcache ]); |
173 | }; | 175 | }; |
174 | 176 | ||
175 | services.cron = { | 177 | services.cron = { |
@@ -179,7 +181,7 @@ in { | |||
179 | #! ${pkgs.stdenv.shell} | 181 | #! ${pkgs.stdenv.shell} |
180 | export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive | 182 | export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive |
181 | export PATH=/run/wrappers/bin:$PATH | 183 | export PATH=/run/wrappers/bin:$PATH |
182 | ${pkgs.php73}/bin/php -d memory_limit=512M -f ${nextcloud}/cron.php | 184 | ${pkgs.php74}/bin/php -d memory_limit=512M -f ${nextcloud}/cron.php |
183 | ''; | 185 | ''; |
184 | in [ | 186 | in [ |
185 | '' | 187 | '' |