* Added virtual hosts for program-transformation.org, strategoxt.org and stratego-language.org.
* Added virtual hosts for program-transformation.org, strategoxt.org and stratego-language.org. svn path=/configurations/trunk/tud/; revision=10723
Eelco Dolstra committed
Feb 18, 2008 at 12:01 UTC
1e1ec784b17443fc0426fcf3df1c517ffa46dcbd
1 file changed
+81
-51
main.nix
+81
-51
@@ -24,6 +24,7 @@ let
24
};
25
26
myIP = "130.161.158.181";
27
+ webdslIP = "130.161.158.185";
28
29
in
30
@@ -63,7 +64,7 @@ rec {
64
subnetMask = "255.255.254.0";
65
}
66
{ name = "eth1:1";
66
- ipAddress = "130.161.158.185";
67
+ ipAddress = webdslIP;
68
subnetMask = "255.255.254.0";
69
}
70
{ name = "eth0";
@@ -97,7 +98,7 @@ rec {
98
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to-source ${myIP}
99
100
# WebDSL server.
100
- iptables -t nat -A PREROUTING -d 130.161.158.185 -i eth1 -p tcp --dport 80 -j DNAT --to-destination ${myIP}:8080
101
+ iptables -t nat -A PREROUTING -d ${webdslIP} -i eth1 -p tcp --dport 80 -j DNAT --to-destination ${myIP}:8080
102
103
echo 1 > /proc/sys/net/ipv4/ip_forward
104
";
@@ -153,6 +154,11 @@ rec {
154
}
155
];
156
157
+ postgresql = {
158
+ enable = true;
159
+ dataDir = "/data/postgresql";
160
+ };
161
+
162
nagios = {
163
enable = true;
164
enableWebInterface = true;
@@ -195,63 +201,87 @@ rec {
201
enable = true;
202
experimental = true;
203
adminAddr = "eelco@cs.uu.nl";
198
- hostName = "buildfarm.st.ewi.tudelft.nl";
199
-
200
- documentRoot = pkgs.lib.cleanSource ./webroot;
204
+ hostName = "localhost";
205
206
+ # !!! move
207
extraSubservices = [
203
- { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/subversion.nix;
204
- config = {
205
- urlPrefix = "";
206
- dataDir = "/data/subversion";
207
- notificationSender = "root@buildfarm.st.ewi.tudelft.nl";
208
- userCreationDomain = "st.ewi.tudelft.nl";
209
- organisation = {
210
- name = "Software Engineering Research Group, TU Delft";
211
- url = http://www.st.ewi.tudelft.nl/;
212
- logo = "/serg-logo.png";
213
- };
214
- };
215
- }
216
- { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/dist-manager.nix;
217
- config = rec {
218
- urlPrefix = "/releases";
219
- distDir = "/data/webserver/dist";
220
- uploaderIPs = ["127.0.0.1" myIP];
221
- distPasswords = "/data/webserver/upload_passwords";
222
- directoriesConf = ''
223
- nix ${distDir}/nix nix-upload
224
- '';
208
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/subversion.nix;
209
+ config = {
210
+ urlPrefix = "";
211
+ dataDir = "/data/subversion";
212
+ notificationSender = "root@buildfarm.st.ewi.tudelft.nl";
213
+ userCreationDomain = "st.ewi.tudelft.nl";
214
+ organisation = {
215
+ name = "Software Engineering Research Group, TU Delft";
216
+ url = http://www.st.ewi.tudelft.nl/;
217
+ logo = "/serg-logo.png";
218
+ };
219
};
220
}
221
];
228
- };
229
- };
222
231
- /*
232
- distManagerService = webServer : pkgs :
233
- (distManager webServer pkgs) {
234
- distDir = "/data/webserver/dist";
235
- distPrefix = "/releases";
236
- distConfDir = "/data/webserver/dist-conf";
237
- directories = ./dist-manager/directories.conf;
238
- };
223
+ virtualHosts = [
224
+
225
+ { hostName = "buildfarm.st.ewi.tudelft.nl";
226
+ documentRoot = pkgs.lib.cleanSource ./webroot;
227
+ extraSubservices = [
228
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/dist-manager.nix;
229
+ config = rec {
230
+ urlPrefix = "/releases";
231
+ distDir = "/data/webserver/dist";
232
+ uploaderIPs = ["127.0.0.1" myIP];
233
+ distPasswords = "/data/webserver/upload_passwords";
234
+ directoriesConf = ''
235
+ nix ${distDir}/nix nix-upload
236
+ '';
237
+ };
238
+ }
239
+ ];
240
+ }
241
240
- distManager = webServer : pkgs : {distDir, distPrefix, distConfDir, directories} :
241
- import ../../services/dist-manager {
242
- inherit (pkgs) stdenv perl;
243
- saxon8 = pkgs.saxonb;
244
- inherit distDir distPrefix distConfDir directories;
245
- canonicalName = "http://" + webServer.hostName +
246
- (if webServer.httpPort == 80 then "" else ":" + (toString webServer.httpPort));
247
- };
242
+ # !!! hacky
243
+ { hostName = "strategoxt.org";
244
+ extraSubservices = [
245
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/twiki.nix;
246
+ config = { startWeb = "Stratego/WebHome"; };
247
+ }
248
+ ];
249
+ }
250
249
- rootFiles = webServer : pkgs :
250
- import ../../services/apache-httpd/subservices/serve-files {
251
- directory = ./webroot;
252
- urlPath = "/";
253
- inherit (pkgs) stdenv;
251
+ { hostName = "www.strategoxt.org";
252
+ extraSubservices = [
253
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/twiki.nix;
254
+ config = { startWeb = "Stratego/WebHome"; };
255
+ }
256
+ ];
257
+ }
258
+
259
+ { hostName = "www.stratego-language.org";
260
+ extraSubservices = [
261
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/twiki.nix;
262
+ config = { startWeb = "Stratego/WebHome"; };
263
+ }
264
+ ];
265
+ }
266
+
267
+ { hostName = "program-transformation.org";
268
+ extraSubservices = [
269
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/twiki.nix;
270
+ config = { startWeb = "Transform/WebHome"; };
271
+ }
272
+ ];
273
+ }
274
+
275
+ { hostName = "www.program-transformation.org";
276
+ extraSubservices = [
277
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/twiki.nix;
278
+ config = { startWeb = "Transform/WebHome"; };
279
+ }
280
+ ];
281
+ }
282
+
283
+ ];
284
};
255
- */
285
+ };
286
287
}