diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-05-07 10:39:56 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-05-08 01:35:21 +0200 |
commit | 65b715d7e4a47f00fe0fca6c4b0eaff19e874d38 (patch) | |
tree | a82893e4520225fb33e96d15e9e67ccecb35b32e /modules/private | |
parent | 4e3e4761c8566cbc47c64d66bfc21bb6dee32860 (diff) | |
download | Nix-65b715d7e4a47f00fe0fca6c4b0eaff19e874d38.tar.gz Nix-65b715d7e4a47f00fe0fca6c4b0eaff19e874d38.tar.zst Nix-65b715d7e4a47f00fe0fca6c4b0eaff19e874d38.zip |
Upgrade nextcloud
Diffstat (limited to 'modules/private')
-rw-r--r-- | modules/private/websites/tools/cloud/default.nix | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/modules/private/websites/tools/cloud/default.nix b/modules/private/websites/tools/cloud/default.nix index 0c6bf0d..3b6a871 100644 --- a/modules/private/websites/tools/cloud/default.nix +++ b/modules/private/websites/tools/cloud/default.nix | |||
@@ -1,15 +1,18 @@ | |||
1 | { lib, pkgs, config, ... }: | 1 | { lib, pkgs, config, ... }: |
2 | let | 2 | let |
3 | nextcloud = pkgs.webapps.nextcloud.withApps (builtins.attrValues pkgs.webapps.nextcloud-apps); | 3 | nextcloud = pkgs.webapps.nextcloud.withApps (a: [ |
4 | a.apporder a.audioplayer a.bookmarks a.calendar a.carnet a.contacts | ||
5 | a.cookbook a.deck a.extract a.files_markdown a.files_readmemd | ||
6 | a.flowupload a.gpxedit a.gpxpod a.keeweb a.maps a.metadata a.music | ||
7 | a.notes a.ocsms a.passman a.polls a.spreed a.tasks | ||
8 | ]); | ||
4 | env = config.myEnv.tools.nextcloud; | 9 | env = config.myEnv.tools.nextcloud; |
5 | varDir = "/var/lib/nextcloud"; | 10 | varDir = "/var/lib/nextcloud"; |
6 | webappName = "tools_nextcloud"; | 11 | webappName = "tools_nextcloud"; |
7 | apacheRoot = "/run/current-system/webapps/${webappName}"; | 12 | apacheRoot = "/run/current-system/webapps/${webappName}"; |
8 | cfg = config.myServices.websites.tools.cloud; | 13 | cfg = config.myServices.websites.tools.cloud; |
9 | phpFpm = rec { | 14 | phpFpm = rec { |
10 | basedir = builtins.concatStringsSep ":" ( | 15 | basedir = builtins.concatStringsSep ":" ([ nextcloud varDir ] ++ nextcloud.apps); |
11 | [ nextcloud varDir ] | ||
12 | ++ builtins.attrValues pkgs.webapps.nextcloud-apps); | ||
13 | pool = { | 16 | pool = { |
14 | "listen.owner" = "wwwrun"; | 17 | "listen.owner" = "wwwrun"; |
15 | "listen.group" = "wwwrun"; | 18 | "listen.group" = "wwwrun"; |
@@ -33,7 +36,6 @@ let | |||
33 | "php_admin_value[open_basedir]" = "/run/wrappers/bin/sendmail:${basedir}:/proc/meminfo:/dev/urandom:/proc/self/fd:/tmp"; | 36 | "php_admin_value[open_basedir]" = "/run/wrappers/bin/sendmail:${basedir}:/proc/meminfo:/dev/urandom:/proc/self/fd:/tmp"; |
34 | "php_admin_value[session.save_path]" = "${varDir}/phpSessions"; | 37 | "php_admin_value[session.save_path]" = "${varDir}/phpSessions"; |
35 | }; | 38 | }; |
36 | phpPackage = pkgs.php72.withExtensions(e: pkgs.php72.enabledExtensions ++ [ e.redis e.apcu e.opcache ]); | ||
37 | }; | 39 | }; |
38 | in { | 40 | in { |
39 | options.myServices.websites.tools.cloud = { | 41 | options.myServices.websites.tools.cloud = { |
@@ -137,8 +139,8 @@ in { | |||
137 | cd ${nextcloud} | 139 | cd ${nextcloud} |
138 | NEXTCLOUD_CONFIG_DIR="${nextcloud}/config" \ | 140 | NEXTCLOUD_CONFIG_DIR="${nextcloud}/config" \ |
139 | exec \ | 141 | exec \ |
140 | sudo -u wwwrun ${pkgs.php72}/bin/php \ | 142 | sudo -u wwwrun ${pkgs.php73}/bin/php \ |
141 | -c ${pkgs.php72}/etc/php.ini \ | 143 | -c ${pkgs.php73}/etc/php.ini \ |
142 | occ $* | 144 | occ $* |
143 | ''; | 145 | ''; |
144 | in [ occ ]; | 146 | in [ occ ]; |
@@ -167,7 +169,7 @@ in { | |||
167 | user = "wwwrun"; | 169 | user = "wwwrun"; |
168 | group = "wwwrun"; | 170 | group = "wwwrun"; |
169 | settings = phpFpm.pool; | 171 | settings = phpFpm.pool; |
170 | phpPackage = pkgs.php72.withExtensions(e: pkgs.php72.enabledExtensions ++ [ e.redis e.apcu e.opcache ]); | 172 | phpPackage = pkgs.php73.withExtensions(e: pkgs.php73.enabledExtensions ++ [ e.redis e.apcu e.opcache ]); |
171 | }; | 173 | }; |
172 | 174 | ||
173 | services.cron = { | 175 | services.cron = { |
@@ -177,7 +179,7 @@ in { | |||
177 | #! ${pkgs.stdenv.shell} | 179 | #! ${pkgs.stdenv.shell} |
178 | export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive | 180 | export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive |
179 | export PATH=/run/wrappers/bin:$PATH | 181 | export PATH=/run/wrappers/bin:$PATH |
180 | ${pkgs.php72}/bin/php -d memory_limit=512M -f ${nextcloud}/cron.php | 182 | ${pkgs.php73}/bin/php -d memory_limit=512M -f ${nextcloud}/cron.php |
181 | ''; | 183 | ''; |
182 | in [ | 184 | in [ |
183 | '' | 185 | '' |