uncommitted changes
svn path=/configurations/trunk/tud/; revision=27151
Rob Vermaas committed
May 4, 2011 at 18:45 UTC
d1210e00f36878514b52815813ddfb4658bf4e93
1 file changed
+20
-6
hydra-module.nix
+20
-6
@@ -4,15 +4,19 @@ with pkgs.lib;
4
5
let
6
cfg = config.services.hydra;
7
-
8
- hydraConf = pkgs.writeScript "hydra.conf" ''
7
+
8
+ hydra = pkgs.hydra;
9
+ hydraConf = pkgs.writeScript "hydra.conf"
10
+ ''
11
using_frontend_proxy 1
12
base_uri ${cfg.hydraURL}
13
notification_sender ${cfg.notificationSender}
14
max_servers 25
15
'';
16
15
- env = ''NIX_REMOTE=daemon HYDRA_DBI="${cfg.dbi}" HYDRA_CONFIG=${cfg.baseDir}/data/hydra.conf HYDRA_DATA=${cfg.baseDir}/data'';
17
+ env = ''NIX_REMOTE=daemon HYDRA_DBI="${cfg.dbi}" HYDRA_CONFIG=${cfg.baseDir}/data/hydra.conf HYDRA_DATA=${cfg.baseDir}/data ''
18
+ + ''HYDRA_TRACKER="${cfg.tracker}" '';
19
+
20
in
21
22
{
@@ -28,7 +32,7 @@ in
32
};
33
34
baseDir = mkOption {
31
- default = ''/home/${user.default}'';
35
+ default = "/home/${user.default}";
36
description = ''
37
The directory holding configuration, logs and temporary files.
38
'';
@@ -68,13 +72,21 @@ in
72
Threshold of minimum disk space (G) to determine if evaluator should run or not.
73
'';
74
};
71
-
75
+
76
notificationSender = mkOption {
77
default = "e.dolstra@tudelft.nl";
78
description = ''
79
Sender email address used for email notifications.
80
'';
81
};
82
+
83
+ tracker = mkOption {
84
+ default = "";
85
+ description = ''
86
+ Piece of HTML that is included on all pages.
87
+ '';
88
+ };
89
+
90
};
91
92
};
@@ -83,6 +95,7 @@ in
95
###### implementation
96
97
config = mkIf cfg.enable {
98
+# environment.systemPackages = [ hydra ];
99
100
users.extraUsers = [
101
{ name = cfg.user;
@@ -100,7 +113,8 @@ in
113
nix.nrBuildUsers = 100;
114
115
nix.gc.automatic = true;
103
- nix.gc.options = ''--max-freed "$((200 * 1024**3 - 1024 * $(df /nix/store | tail -n 1 | awk '{ print $4 }')))"'';
116
+ # $3 / $4 don't always work depending on length of device name
117
+ nix.gc.options = ''--max-freed "$((200 * 1024**3 - 1024 * $(df /nix/store | tail -n 1 | awk '{ print $3 }')))"'';
118
119
nix.extraOptions = ''
120
gc-keep-outputs = true