From dc9a118a04e3fef47278e5faf3c91d4176477beb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Thu, 5 May 2011 10:07:56 +0000
Subject: [PATCH] hydra-module: Add a `port' option.

---
 hydra-module.nix | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/hydra-module.nix b/hydra-module.nix
index 6a358761..6f51470a 100644
--- a/hydra-module.nix
+++ b/hydra-module.nix
@@ -17,6 +17,7 @@ let
       + ''HYDRA_DBI="${cfg.dbi}" ''
       + ''HYDRA_CONFIG=${cfg.baseDir}/data/hydra.conf ''
       + ''HYDRA_DATA=${cfg.baseDir}/data ''
+      + ''HYDRA_PORT="${toString cfg.port}" ''
       + ''HYDRA_TRACKER="${cfg.tracker}" ;'';
 
 in
@@ -67,7 +68,14 @@ in
           The base URL for the Hydra webserver instance. Used for links in emails. 
         '';
       };
-      
+
+      port = mkOption {
+        default = 3000;
+        description = ''
+          TCP port the web server should listen to.
+        '';
+      };
+
       minimumDiskFree = mkOption {
         default = 5;
         description = ''