Support organization configuration for subversion
svn path=/nixos/trunk/; revision=8006
This commit is contained in:
parent
312e3d0e6b
commit
8e6c1ba85d
@ -578,6 +578,30 @@
|
||||
";
|
||||
}
|
||||
|
||||
{
|
||||
name = ["services" "httpd" "subservices" "subversion" "organization" "name"];
|
||||
default = null;
|
||||
description = "
|
||||
Name of the organization hosting the Subversion service.
|
||||
";
|
||||
}
|
||||
|
||||
{
|
||||
name = ["services" "httpd" "subservices" "subversion" "organization" "url"];
|
||||
default = null;
|
||||
description = "
|
||||
URL of the website of the organization hosting the Subversion service.
|
||||
";
|
||||
}
|
||||
|
||||
{
|
||||
name = ["services" "httpd" "subservices" "subversion" "organization" "logo"];
|
||||
default = null;
|
||||
description = "
|
||||
Logo the organization hosting the Subversion service.
|
||||
";
|
||||
}
|
||||
|
||||
{
|
||||
name = ["services" "httpd" "extraSubservices" "enable"];
|
||||
default = false;
|
||||
|
@ -5,6 +5,7 @@ let
|
||||
getCfg = option: config.get ["services" "httpd" option];
|
||||
getCfgs = options: config.get (["services" "httpd"] ++ options);
|
||||
getCfgSvn = option: config.get ["services" "httpd" "subservices" "subversion" option];
|
||||
getCfgsSvn = options: config.get (["services" "httpd" "subservices" "subversion"] ++ options);
|
||||
|
||||
optional = conf: subService:
|
||||
if conf then [subService] else [];
|
||||
@ -31,7 +32,7 @@ let
|
||||
# The Subversion subservice.
|
||||
(optional (getCfgSvn "enable") (
|
||||
let dataDir = getCfgSvn "dataDir"; in
|
||||
import ../services/subversion {
|
||||
import ../services/subversion ({
|
||||
reposDir = dataDir + "/repos";
|
||||
dbDir = dataDir + "/db";
|
||||
distsDir = dataDir + "/dist";
|
||||
@ -51,7 +52,19 @@ let
|
||||
userCreationDomain = getCfgSvn "userCreationDomain";
|
||||
|
||||
inherit pkgs;
|
||||
})
|
||||
} //
|
||||
( if getCfgsSvn ["organization" "name"] != null then
|
||||
{
|
||||
orgName = getCfgsSvn ["organization" "name"];
|
||||
orgLogoFile = getCfgsSvn ["organization" "logo"];
|
||||
orgUrl = getCfgsSvn ["organization" "url"];
|
||||
}
|
||||
else
|
||||
# use the default from the subversion service
|
||||
{}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
++
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user