diff options
Diffstat (limited to 'nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix')
-rw-r--r-- | nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix index de3c7d693d47..7f50b8fd8d44 100644 --- a/nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -126,10 +126,14 @@ let </IfModule> ''; - luaSetPaths = '' + luaSetPaths = let + # support both lua and lua.withPackages derivations + luaversion = cfg.package.lua5.lua.luaversion or cfg.package.lua5.luaversion; + in + '' <IfModule mod_lua.c> - LuaPackageCPath ${cfg.package.lua5}/lib/lua/${cfg.package.lua5.lua.luaversion}/?.so - LuaPackagePath ${cfg.package.lua5}/share/lua/${cfg.package.lua5.lua.luaversion}/?.lua + LuaPackageCPath ${cfg.package.lua5}/lib/lua/${luaversion}/?.so + LuaPackagePath ${cfg.package.lua5}/share/lua/${luaversion}/?.lua </IfModule> ''; @@ -333,7 +337,7 @@ let ${sslConf} - ${if cfg.package.luaSupport then luaSetPaths else ""} + ${optionalString cfg.package.luaSupport luaSetPaths} # Fascist default - deny access to everything. <Directory /> |