From dcac3ec730176549cd52a9a42db2001dc652c30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 7 May 2020 11:58:37 +0200 Subject: Remove overlay that overrides the php version --- modules/private/websites/tools/cloud/default.nix | 14 ++++++----- modules/private/websites/tools/dav/default.nix | 1 + modules/private/websites/tools/git/default.nix | 1 + modules/private/websites/tools/mail/default.nix | 11 ++++++-- modules/private/websites/tools/mail/rainloop.nix | 4 +-- .../private/websites/tools/mail/roundcubemail.nix | 6 +---- modules/private/websites/tools/tools/default.nix | 29 ++++++++++++++++------ 7 files changed, 43 insertions(+), 23 deletions(-) (limited to 'modules/private/websites/tools') diff --git a/modules/private/websites/tools/cloud/default.nix b/modules/private/websites/tools/cloud/default.nix index b9bb32f..73a837f 100644 --- a/modules/private/websites/tools/cloud/default.nix +++ b/modules/private/websites/tools/cloud/default.nix @@ -11,9 +11,9 @@ let [ nextcloud varDir ] ++ builtins.attrValues pkgs.webapps.nextcloud-apps); phpConfig = '' - extension=${pkgs.phpPackages.redis}/lib/php/extensions/redis.so - extension=${pkgs.phpPackages.apcu}/lib/php/extensions/apcu.so - zend_extension=${pkgs.php}/lib/php/extensions/opcache.so + extension=${pkgs.php72Packages.redis}/lib/php/extensions/redis.so + extension=${pkgs.php72Packages.apcu}/lib/php/extensions/apcu.so + zend_extension=${pkgs.php72}/lib/php/extensions/opcache.so ''; pool = { "listen.owner" = "wwwrun"; @@ -38,6 +38,7 @@ 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; }; in { options.myServices.websites.tools.cloud = { @@ -141,8 +142,8 @@ in { cd ${nextcloud} NEXTCLOUD_CONFIG_DIR="${nextcloud}/config" \ exec \ - sudo -u wwwrun ${pkgs.php}/bin/php \ - -c ${pkgs.php}/etc/php.ini \ + sudo -u wwwrun ${pkgs.php72}/bin/php \ + -c ${pkgs.php72}/etc/php.ini \ occ $* ''; in [ occ ]; @@ -172,6 +173,7 @@ in { group = "wwwrun"; settings = phpFpm.pool; phpOptions = config.services.phpfpm.phpOptions + phpFpm.phpConfig; + phpPackage = pkgs.php72; }; services.cron = { @@ -181,7 +183,7 @@ in { #! ${pkgs.stdenv.shell} export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive export PATH=/run/wrappers/bin:$PATH - ${pkgs.php}/bin/php -d memory_limit=512M -f ${nextcloud}/cron.php + ${pkgs.php72}/bin/php -d memory_limit=512M -f ${nextcloud}/cron.php ''; in [ '' diff --git a/modules/private/websites/tools/dav/default.nix b/modules/private/websites/tools/dav/default.nix index 14e4069..f53cf58 100644 --- a/modules/private/websites/tools/dav/default.nix +++ b/modules/private/websites/tools/dav/default.nix @@ -47,6 +47,7 @@ in { user = config.services.httpd.Tools.user; group = config.services.httpd.Tools.group; settings = davical.phpFpm.pool; + phpPackage = pkgs.php72; }; }; diff --git a/modules/private/websites/tools/git/default.nix b/modules/private/websites/tools/git/default.nix index 55f9ecb..8b1afa8 100644 --- a/modules/private/websites/tools/git/default.nix +++ b/modules/private/websites/tools/git/default.nix @@ -43,6 +43,7 @@ in { user = config.services.httpd.Tools.user; group = config.services.httpd.Tools.group; settings = mantisbt.phpFpm.pool; + phpPackage = pkgs.php72; }; }; }; diff --git a/modules/private/websites/tools/mail/default.nix b/modules/private/websites/tools/mail/default.nix index dda2d45..217ef1a 100644 --- a/modules/private/websites/tools/mail/default.nix +++ b/modules/private/websites/tools/mail/default.nix @@ -4,7 +4,9 @@ let inherit (pkgs.webapps) roundcubemail roundcubemail-plugins roundcubemail-skins; env = config.myEnv.tools.roundcubemail; }; - rainloop = pkgs.callPackage ./rainloop.nix {}; + rainloop = pkgs.callPackage ./rainloop.nix { + rainloop = pkgs.rainloop-community; + }; cfg = config.myServices.websites.tools.email; pcfg = config.services.phpfpm.pools; in @@ -60,12 +62,17 @@ in user = "wwwrun"; group = "wwwrun"; settings = roundcubemail.phpFpm.pool; - phpOptions = config.services.phpfpm.phpOptions + roundcubemail.phpFpm.phpConfig; + phpOptions = config.services.phpfpm.phpOptions + '' + date.timezone = 'CET' + extension=${pkgs.php72Packages.imagick}/lib/php/extensions/imagick.so + ''; + phpPackage = pkgs.php72; }; services.phpfpm.pools.rainloop = { user = "wwwrun"; group = "wwwrun"; settings = rainloop.phpFpm.pool; + phpPackage = pkgs.php72; }; system.activationScripts = { roundcubemail = roundcubemail.activationScript; diff --git a/modules/private/websites/tools/mail/rainloop.nix b/modules/private/websites/tools/mail/rainloop.nix index 9b1f0c5..21de5eb 100644 --- a/modules/private/websites/tools/mail/rainloop.nix +++ b/modules/private/websites/tools/mail/rainloop.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, writeText, stdenv, fetchurl }: +{ lib, rainloop, writeText, stdenv, fetchurl }: rec { varDir = "/var/lib/rainloop"; activationScript = { @@ -9,7 +9,7 @@ rec { install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/data ''; }; - webRoot = pkgs.rainloop-community.override { dataPath = "${varDir}/data"; }; + webRoot = rainloop.override { dataPath = "${varDir}/data"; }; apache = rec { user = "wwwrun"; group = "wwwrun"; diff --git a/modules/private/websites/tools/mail/roundcubemail.nix b/modules/private/websites/tools/mail/roundcubemail.nix index 0b35d02..6875bae 100644 --- a/modules/private/websites/tools/mail/roundcubemail.nix +++ b/modules/private/websites/tools/mail/roundcubemail.nix @@ -1,4 +1,4 @@ -{ env, roundcubemail, roundcubemail-plugins, roundcubemail-skins, phpPackages, apacheHttpd }: +{ env, roundcubemail, roundcubemail-plugins, roundcubemail-skins, apacheHttpd }: rec { varDir = "/var/lib/roundcubemail"; activationScript = { @@ -103,10 +103,6 @@ rec { [ webRoot "/var/secrets/webapps/tools-roundcube" varDir ] ++ webRoot.plugins ++ webRoot.skins); - phpConfig = '' - date.timezone = 'CET' - extension=${phpPackages.imagick}/lib/php/extensions/imagick.so - ''; pool = { "listen.owner" = apache.user; "listen.group" = apache.group; diff --git a/modules/private/websites/tools/tools/default.nix b/modules/private/websites/tools/tools/default.nix index a5e7f2e..dcda15a 100644 --- a/modules/private/websites/tools/tools/default.nix +++ b/modules/private/websites/tools/tools/default.nix @@ -9,12 +9,13 @@ let ttrss = pkgs.callPackage ./ttrss.nix { inherit (pkgs.webapps) ttrss ttrss-plugins; env = config.myEnv.tools.ttrss; + php = pkgs.php72; }; kanboard = pkgs.callPackage ./kanboard.nix { env = config.myEnv.tools.kanboard; }; wallabag = pkgs.callPackage ./wallabag.nix { - inherit (pkgs.webapps) wallabag; + wallabag = pkgs.webapps.wallabag.override { composerEnv = pkgs.composerEnv.override { php = pkgs.php72; }; }; env = config.myEnv.tools.wallabag; }; yourls = pkgs.callPackage ./yourls.nix { @@ -36,7 +37,7 @@ let env = config.myEnv.tools.phpldapadmin; }; grocy = pkgs.callPackage ./grocy.nix { - inherit (pkgs.webapps) grocy; + grocy = pkgs.webapps.grocy.override { composerEnv = pkgs.composerEnv.override { php = pkgs.php72; }; }; }; phpbb = pkgs.callPackage ./phpbb.nix { phpbb = (pkgs.webapps.phpbb.withLangs (l: [ l.fr ])).withExts (e: [ @@ -260,7 +261,7 @@ in { description = "Tiny Tiny RSS feeds update daemon"; serviceConfig = { User = "wwwrun"; - ExecStart = "${pkgs.php}/bin/php ${ttrss.webRoot}/update.php --daemon"; + ExecStart = "${pkgs.php72}/bin/php ${ttrss.webRoot}/update.php --daemon"; StandardOutput = "syslog"; StandardError = "syslog"; PermissionsStartOnly = true; @@ -300,6 +301,7 @@ in { phpEnv = { CONTACT_EMAIL = config.myEnv.tools.contact; }; + phpPackage = pkgs.php72; }; devtools = { user = "wwwrun"; @@ -316,37 +318,43 @@ in { "php_admin_value[open_basedir]" = "/run/wrappers/bin/sendmail:/var/lib/ftp/devtools.immae.eu:/tmp"; }; phpOptions = config.services.phpfpm.phpOptions + '' - extension=${pkgs.php}/lib/php/extensions/mysqli.so - extension=${pkgs.phpPackages.redis}/lib/php/extensions/redis.so - extension=${pkgs.phpPackages.apcu}/lib/php/extensions/apcu.so - zend_extension=${pkgs.php}/lib/php/extensions/opcache.so + extension=${pkgs.php72}/lib/php/extensions/mysqli.so + extension=${pkgs.php72Packages.redis}/lib/php/extensions/redis.so + extension=${pkgs.php72Packages.apcu}/lib/php/extensions/apcu.so + zend_extension=${pkgs.php72}/lib/php/extensions/opcache.so ''; + phpPackage = pkgs.php72; }; adminer = adminer.phpFpm; ttrss = { user = "wwwrun"; group = "wwwrun"; settings = ttrss.phpFpm.pool; + phpPackage = pkgs.php72; }; wallabag = { user = "wwwrun"; group = "wwwrun"; settings = wallabag.phpFpm.pool; + phpPackage = pkgs.php72; }; yourls = { user = "wwwrun"; group = "wwwrun"; settings = yourls.phpFpm.pool; + phpPackage = pkgs.php72; }; rompr = { user = "wwwrun"; group = "wwwrun"; settings = rompr.phpFpm.pool; + phpPackage = pkgs.php72; }; shaarli = { user = "wwwrun"; group = "wwwrun"; settings = shaarli.phpFpm.pool; + phpPackage = pkgs.php72; }; dmarc-reports = { user = "wwwrun"; @@ -354,18 +362,21 @@ in { settings = dmarc-reports.phpFpm.pool; phpEnv = dmarc-reports.phpFpm.phpEnv; phpOptions = config.services.phpfpm.phpOptions + '' - extension=${pkgs.php}/lib/php/extensions/mysqli.so + extension=${pkgs.php72}/lib/php/extensions/mysqli.so ''; + phpPackage = pkgs.php72; }; dokuwiki = { user = "wwwrun"; group = "wwwrun"; settings = dokuwiki.phpFpm.pool; + phpPackage = pkgs.php72; }; phpbb = { user = "wwwrun"; group = "wwwrun"; settings = phpbb.phpFpm.pool; + phpPackage = pkgs.php72; }; ldap = { user = "wwwrun"; @@ -377,11 +388,13 @@ in { user = "wwwrun"; group = "wwwrun"; settings = kanboard.phpFpm.pool; + phpPackage = pkgs.php72; }; grocy = { user = "wwwrun"; group = "wwwrun"; settings = grocy.phpFpm.pool; + phpPackage = pkgs.php72; }; }; -- cgit v1.2.3