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 = "";