From 0e22df1587d274f3527a3c652127613a9deb8018 Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Wed, 4 Nov 2009 17:00:53 +0000 Subject: [PATCH] * Use sub-modules for httpd virtual hosts. This add documentation entries and allow non-intrusive extensions of virtual hosts. svn path=/nixos/trunk/; revision=18107 --- .../apache-httpd/per-server-options.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/services/web-servers/apache-httpd/per-server-options.nix b/modules/services/web-servers/apache-httpd/per-server-options.nix index 480144fb08d2..cdb1f72a9450 100644 --- a/modules/services/web-servers/apache-httpd/per-server-options.nix +++ b/modules/services/web-servers/apache-httpd/per-server-options.nix @@ -6,7 +6,7 @@ {config, pkgs, ...}: let - inherit (pkgs.lib) mkOption addDefaultOptionValues; + inherit (pkgs.lib) mkOption addDefaultOptionValues types; perServerOptions = {forMainServer}: { @@ -161,6 +161,7 @@ in documentRoot = "/data/webroot-bar"; } ]; + type = with types; listOf optionSet; description = '' Specification of the virtual hosts served by Apache. Each element should be an attribute set specifying the @@ -168,16 +169,13 @@ in are the non-global options permissible for the main host. ''; - # Add the default value for each function which is not defined. - # This should be replaced by sub-modules. - apply = - map (vhost: - addDefaultOptionValues vhostOptions vhost - ); + options = [ + vhostOptions + ]; }; } // perServerOptions {forMainServer = true;} ; }; -} \ No newline at end of file +}