From 34890e7c2a825d0d43dc4d6d070d706181ae8374 Mon Sep 17 00:00:00 2001 From: Chris Farmiloe Date: Tue, 20 May 2014 10:50:39 +0100 Subject: [PATCH] nixos: Add enablePHP convinence option to services.httpd module to mimic subservices option Fixes #2699 --- .../modules/services/web-servers/apache-httpd/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index 6d0416fbb15..eb3cb75b658 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -387,7 +387,7 @@ let ''; - enablePHP = any (svc: svc.enablePHP) allSubservices; + enablePHP = mainCfg.enablePHP || any (svc: svc.enablePHP) allSubservices; # Generate the PHP configuration file. Should probably be factored @@ -531,6 +531,12 @@ in ''; }; + enablePHP = mkOption { + type = types.bool; + default = false; + description = "Whether to enable the PHP module."; + }; + phpOptions = mkOption { type = types.lines; default = "";