diff --git a/upstart-jobs/apache-httpd/subversion.nix b/upstart-jobs/apache-httpd/subversion.nix
index d561cd4c652d..d75e69c55247 100644
--- a/upstart-jobs/apache-httpd/subversion.nix
+++ b/upstart-jobs/apache-httpd/subversion.nix
@@ -301,6 +301,12 @@ in {
${distConfig}
${staticFilesConfig}
+
+ ${if config.toplevelRedirect then ''
+
+ DirectoryIndex repoman
+
+ '' else ""}
'';
@@ -341,6 +347,15 @@ in {
";
};
+ toplevelRedirect = mkOption {
+ default = true;
+ description = "
+ Whether urlPrefix without any suffix
+ (except a slash) should redirect to
+ urlPrefix/repoman.
+ ";
+ };
+
notificationSender = mkOption {
default = "svn-server@example.org";
example = "svn-server@example.org";