diff --git a/system/options.nix b/system/options.nix index d5f0ea6e860b..f468b8047445 100644 --- a/system/options.nix +++ b/system/options.nix @@ -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; diff --git a/upstart-jobs/httpd.nix b/upstart-jobs/httpd.nix index d39a8206324e..20c6cb7a331d 100644 --- a/upstart-jobs/httpd.nix +++ b/upstart-jobs/httpd.nix @@ -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 + {} + ) + ) + ) ) ++