From 5b1a4730bc65ff7c5310bc885f9dbd0c28182fee Mon Sep 17 00:00:00 2001 From: Izorkin Date: Sat, 15 Jun 2019 18:13:04 +0300 Subject: [PATCH] nixos/nextcloud: fix work with phpfpm-rootless mode --- nixos/modules/services/web-apps/nextcloud.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index bb39a5d1d71..35be5cb9712 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -394,13 +394,14 @@ in { phpOptions))); in { phpOptions = phpOptionsExtensions; + socketName = "nextcloud"; phpPackage = phpPackage; - listen = "/run/phpfpm/nextcloud"; + user = "nextcloud"; + group = "${config.services.nginx.group}"; extraConfig = '' - listen.owner = nginx - listen.group = nginx - user = nextcloud - group = nginx + listen.owner = ${config.services.nginx.user} + listen.group = ${config.services.nginx.group} + listen.mode = 0600 ${cfg.poolConfig} env[NEXTCLOUD_CONFIG_DIR] = ${cfg.home}/config env[PATH] = /run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin @@ -466,7 +467,7 @@ in { fastcgi_param HTTPS ${if cfg.https then "on" else "off"}; fastcgi_param modHeadersAvailable true; fastcgi_param front_controller_active true; - fastcgi_pass unix:/run/phpfpm/nextcloud; + fastcgi_pass unix:/run/phpfpm-nextcloud/nextcloud.sock; fastcgi_intercept_errors on; fastcgi_request_buffering off; fastcgi_read_timeout 120s;