nixos/lighttpd: add services.lighttpd.enableModules option

This option makes the coupling between lighttpd and its sub-services
more "loose".

While the option is a list, its purpose is to provide a "set" of needed
modules to load for lighttpd to function correctly with its config. The
NixOS lighttpd module ensures that lighttpd modules are loaded no more
than once (because lighttpd dislikes that), and in the correct order.

Also add an assertion that all modules listed in .enableModules are
valid.
This commit is contained in:
Bjørn Forsman
2014-10-05 19:15:19 +02:00
parent 5c6170a848
commit fca51849ec
3 changed files with 88 additions and 13 deletions
@@ -44,6 +44,9 @@ in
# make the cgitrc manpage available
environment.systemPackages = [ pkgs.cgit ];
# declare module dependencies
services.lighttpd.enableModules = [ "mod_cgi" "mod_alias" "mod_setenv" ];
services.lighttpd.extraConfig = ''
$HTTP["url"] =~ "^/cgit" {
cgi.assign = (