]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/tools/cloud/default.nix
Upgrade nextcloud
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / cloud / default.nix
index 0c6bf0d5ee55dd60c68a3a0137845700c1fd1871..3b6a8718b29713ad32e0ee60ac938e1cc189db9f 100644 (file)
@@ -1,15 +1,18 @@
 { lib, pkgs, config,  ... }:
 let
-  nextcloud = pkgs.webapps.nextcloud.withApps (builtins.attrValues pkgs.webapps.nextcloud-apps);
+  nextcloud = pkgs.webapps.nextcloud.withApps (a: [
+    a.apporder a.audioplayer a.bookmarks a.calendar a.carnet a.contacts
+    a.cookbook a.deck a.extract a.files_markdown a.files_readmemd
+    a.flowupload a.gpxedit a.gpxpod a.keeweb a.maps a.metadata a.music
+    a.notes a.ocsms a.passman a.polls a.spreed a.tasks
+  ]);
   env = config.myEnv.tools.nextcloud;
   varDir = "/var/lib/nextcloud";
   webappName = "tools_nextcloud";
   apacheRoot = "/run/current-system/webapps/${webappName}";
   cfg = config.myServices.websites.tools.cloud;
   phpFpm = rec {
-    basedir = builtins.concatStringsSep ":" (
-      [ nextcloud varDir ]
-      ++ builtins.attrValues pkgs.webapps.nextcloud-apps);
+    basedir = builtins.concatStringsSep ":" ([ nextcloud varDir ] ++ nextcloud.apps);
     pool = {
       "listen.owner" = "wwwrun";
       "listen.group" = "wwwrun";
@@ -33,7 +36,6 @@ let
       "php_admin_value[open_basedir]" = "/run/wrappers/bin/sendmail:${basedir}:/proc/meminfo:/dev/urandom:/proc/self/fd:/tmp";
       "php_admin_value[session.save_path]" = "${varDir}/phpSessions";
     };
-    phpPackage = pkgs.php72.withExtensions(e: pkgs.php72.enabledExtensions ++ [ e.redis e.apcu e.opcache ]);
   };
 in {
   options.myServices.websites.tools.cloud = {
@@ -137,8 +139,8 @@ in {
         cd ${nextcloud}
         NEXTCLOUD_CONFIG_DIR="${nextcloud}/config" \
           exec \
-          sudo -u wwwrun ${pkgs.php72}/bin/php \
-          -c ${pkgs.php72}/etc/php.ini \
+          sudo -u wwwrun ${pkgs.php73}/bin/php \
+          -c ${pkgs.php73}/etc/php.ini \
           occ $*
         '';
     in [ occ ];
@@ -167,7 +169,7 @@ in {
       user = "wwwrun";
       group = "wwwrun";
       settings = phpFpm.pool;
-      phpPackage = pkgs.php72.withExtensions(e: pkgs.php72.enabledExtensions ++ [ e.redis e.apcu e.opcache ]);
+      phpPackage = pkgs.php73.withExtensions(e: pkgs.php73.enabledExtensions ++ [ e.redis e.apcu e.opcache ]);
     };
 
     services.cron = {
@@ -177,7 +179,7 @@ in {
           #! ${pkgs.stdenv.shell}
           export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
           export PATH=/run/wrappers/bin:$PATH
-          ${pkgs.php72}/bin/php -d memory_limit=512M -f ${nextcloud}/cron.php
+          ${pkgs.php73}/bin/php -d memory_limit=512M -f ${nextcloud}/cron.php
           '';
       in [
         ''