diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-02-01 20:11:38 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-02-01 21:00:44 +0300 |
commit | 809a35ba85df0a202d26d9ee8cfa474c7eecdf99 (patch) | |
tree | 4e72d07fabf4d8bbcd1c731dc54a7745bc88db92 /modules/apps/mediawiki | |
parent | 092d712689eec989003ec23f5ac19da9134acea4 (diff) | |
download | nixsap-809a35ba85df0a202d26d9ee8cfa474c7eecdf99.tar.gz |
php-fpm: make use of home directory
Potentially breaking, these options are removed:
pool.user, pool.listen.owner, pool.listen.mode.
Since socket owner cannot be set now,
nginx needs to belong to the appropriate PHP-FPM group.
Diffstat (limited to 'modules/apps/mediawiki')
-rw-r--r-- | modules/apps/mediawiki/default.nix | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/modules/apps/mediawiki/default.nix b/modules/apps/mediawiki/default.nix index 2988f07..07dc6e9 100644 --- a/modules/apps/mediawiki/default.nix +++ b/modules/apps/mediawiki/default.nix @@ -14,11 +14,10 @@ let attrNames elem isAttrs isBool isList isString ; cfg = config.nixsap.apps.mediawiki; - user = config.nixsap.apps.mediawiki.user; + user = cfg.user; php = cfg.php-fpm.package; defaultPool = { - listen.owner = config.nixsap.apps.nginx.user; pm.max_children = 10; pm.max_requests = 1000; pm.max_spare_servers = 5; @@ -163,7 +162,7 @@ let } chmod -Rc u=rwX,g=rX,o= '${cfg.localSettings.wgUploadDirectory}' - chown -Rc '${user}:${user}' '${cfg.localSettings.wgUploadDirectory}' + chown -Rc '${cfg.user}:${cfg.user}' '${cfg.localSettings.wgUploadDirectory}' ''; nginx = '' @@ -295,13 +294,13 @@ in { }; config = mkIf cfg.enable { - nixsap.deployment.keyrings.${user} = keys; - users.users.${config.nixsap.apps.nginx.user}.extraGroups = - mkIf cfg.localSettings.wgEnableUploads [ user ]; + nixsap.deployment.keyrings.${cfg.user} = keys; + users.users.${config.nixsap.apps.nginx.user}.extraGroups = [ cfg.user ]; nixsap.apps.php-fpm.mediawiki = mkOverride 0 { + inherit (cfg) user; inherit (cfg.php-fpm) package; - pool = recursiveUpdate defaultPool (cfg.php-fpm.pool // { user = cfg.user ;}); + pool = recursiveUpdate defaultPool cfg.php-fpm.pool; }; nixsap.apps.nginx.conf.http.servers.mediawiki = nginx; @@ -314,7 +313,7 @@ in { serviceConfig = { RemainAfterExit = true; Type = "oneshot"; - User = config.nixsap.apps.php-fpm.mediawiki.pool.user; + User = cfg.user; ExecStart = "${mediawiki-db}/bin/mediawiki-db"; }; }; |