]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/system/quatresaisons/nextcloud.nix
Bump Nextcloud to latest version
[perso/Immae/Config/Nix.git] / modules / private / system / quatresaisons / nextcloud.nix
index 89d69d5f0fe5f686d58df1829289d0a15d428cc5..2f6aafd8a2aa26721a2d0433f4ba84599b2ce1e9 100644 (file)
@@ -1,12 +1,10 @@
 { lib, pkgs, config,  ... }:
 let
-  nextcloud = pkgs.webapps.nextcloud.withApps (a: [
-    a.apporder a.audioplayer a.bookmarks a.calendar a.carnet a.circles
-    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.social a.tasks
-  ]);
+  phpPackage = (pkgs.php74.withExtensions({ enabled, all }: enabled ++ [ all.redis all.apcu all.opcache all.imagick ])).override { extraConfig = ''
+    apc.enable_cli = 1
+    '';
+  };
+  nextcloud = pkgs.webapps.nextcloud_22.withApps (a: [ a.calendar a.contacts ]);
   varDir = "/var/lib/nextcloud";
   phpFpm = rec {
     basedir = builtins.concatStringsSep ":" ([ nextcloud varDir ] ++ nextcloud.apps);
@@ -95,8 +93,8 @@ in {
         cd ${nextcloud}
         NEXTCLOUD_CONFIG_DIR="${nextcloud}/config" \
           exec \
-          sudo -E -u wwwrun ${pkgs.php74}/bin/php \
-          -c ${pkgs.php74}/etc/php.ini \
+          sudo -E -u wwwrun ${phpPackage}/bin/php \
+          -c ${phpPackage}/etc/php.ini \
           occ $*
         '';
     in [ occ ];
@@ -119,7 +117,7 @@ in {
       user = "wwwrun";
       group = "wwwrun";
       settings = phpFpm.pool;
-      phpPackage = pkgs.php74.withExtensions({ enabled, all }: enabled ++ [ all.redis all.apcu all.opcache all.imagick ]);
+      inherit phpPackage;
     };
 
     services.cron = {
@@ -129,7 +127,7 @@ in {
           #! ${pkgs.stdenv.shell}
           export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive
           export PATH=/run/wrappers/bin:$PATH
-          ${pkgs.php74}/bin/php -d memory_limit=512M -f ${nextcloud}/cron.php
+          ${phpPackage}/bin/php -d memory_limit=512M -f ${nextcloud}/cron.php
           '';
       in [
         ''