httpd.extraModules: now accpets string items loading modules beeing distributed by apache
removed pkgs : arg svn path=/nixos/trunk/; revision=12861
This commit is contained in:
parent
d5da3185fe
commit
ca031ce720
@ -1716,11 +1716,12 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraModules = mkOption {
|
extraModules = mkOption {
|
||||||
default = pkgs : [];
|
default = [];
|
||||||
|
example = [ "proxy_connect" { name = "php5_module"; path = "${pkgs.php}/modules/libphp5.so"; } ];
|
||||||
description = ''
|
description = ''
|
||||||
used to add additional modules
|
Loads additional modules either beeing distributed with apache.
|
||||||
Example for PHP:
|
If the module is contained in a foreign package (such as php5_module)
|
||||||
pkgs : [ { name = "php5_module"; path = "${pkgs.php}/modules/libphp5.so" } ]
|
kse an attrset as given in the example.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,7 +12,10 @@ let
|
|||||||
|
|
||||||
|
|
||||||
getPort = cfg: if cfg.port != 0 then cfg.port else if cfg.enableSSL then 443 else 80;
|
getPort = cfg: if cfg.port != 0 then cfg.port else if cfg.enableSSL then 443 else 80;
|
||||||
|
|
||||||
|
extraModules = pkgs.lib.traceWhatis ( pkgs.lib.getAttr ["extraModules"] [] mainCfg;
|
||||||
|
extraForeignModules = pkgs.lib.filter builtins.isAttrs extraModules;
|
||||||
|
extraApachaModules = pkgs.lib.filter (x :! (builtins.isAttrs x)) extraModules; # I'd prefer using builtins.isString here, but doesn't exist yet
|
||||||
|
|
||||||
makeServerInfo = cfg: {
|
makeServerInfo = cfg: {
|
||||||
# Canonical name must not include a trailing slash.
|
# Canonical name must not include a trailing slash.
|
||||||
@ -105,7 +108,7 @@ let
|
|||||||
"mime" "dav" "status" "autoindex" "asis" "info" "cgi" "dav_fs"
|
"mime" "dav" "status" "autoindex" "asis" "info" "cgi" "dav_fs"
|
||||||
"vhost_alias" "negotiation" "dir" "imagemap" "actions" "speling"
|
"vhost_alias" "negotiation" "dir" "imagemap" "actions" "speling"
|
||||||
"userdir" "alias" "rewrite" "proxy" "proxy_http"
|
"userdir" "alias" "rewrite" "proxy" "proxy_http"
|
||||||
] ++ optional enableSSL "ssl";
|
] ++ optional enableSSL "ssl" ++ extraApachaModules;
|
||||||
|
|
||||||
|
|
||||||
loggingConf = ''
|
loggingConf = ''
|
||||||
@ -297,8 +300,7 @@ let
|
|||||||
allModules =
|
allModules =
|
||||||
concatMap (svc: svc.extraModulesPre) allSubservices ++
|
concatMap (svc: svc.extraModulesPre) allSubservices ++
|
||||||
map (name: {inherit name; path = "${httpd}/modules/mod_${name}.so";}) apacheModules ++
|
map (name: {inherit name; path = "${httpd}/modules/mod_${name}.so";}) apacheModules ++
|
||||||
concatMap (svc: svc.extraModules) allSubservices ++
|
concatMap (svc: svc.extraModules) allSubservices ++ extraForeignModules;
|
||||||
(pkgs.lib.getAttr ["extraModules"] (x:[]) mainCfg) pkgs;
|
|
||||||
in concatMapStrings load allModules
|
in concatMapStrings load allModules
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user