* svn.nixos.org.
svn path=/configurations/trunk/tud/; revision=10778
Eelco Dolstra committed
Feb 20, 2008 at 12:54 UTC
45db84753cf44f631daae4fd4557443f1e95c5ba
1 file changed
+93
-72
main.nix
+93
-72
@@ -85,7 +85,7 @@ rec {
85
localCommands =
86
# Provide NATting for the build machines on 192.168.1.*.
87
# Obviously, this should be something that NixOS provides.
88
- "
88
+ ''
89
export PATH=${pkgs.iptables}/sbin:$PATH
90
91
modprobe ip_tables
@@ -100,10 +100,10 @@ rec {
100
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to-source ${myIP}
101
102
# WebDSL server.
103
- iptables -t nat -A PREROUTING -d ${webdslIP} -i eth1 -p tcp --dport 80 -j DNAT --to-destination ${myIP}:8080
103
+ iptables -t nat -A PREROUTING -d ${webdslIP} -i eth1 -p tcp --dport 80 -j DNAT --to-destination ${myIP}:8080
104
105
echo 1 > /proc/sys/net/ipv4/ip_forward
106
- ";
106
+ '';
107
108
defaultMailServer = {
109
directDelivery = true;
@@ -119,7 +119,7 @@ rec {
119
120
cron = {
121
systemCronJobs = [
122
- "25 * * * * root (TZ=CET date; ${pkgs.rsync}/bin/rsync -razv --numeric-ids --delete /data/subversion /data/subversion-strategoxt /data/vm /data/pt-wiki /data/postgresql unixhome.st.ewi.tudelft.nl::bfarm/) >> /var/log/backup.log 2>&1"
122
+ "25 * * * * root (TZ=CET date; ${pkgs.rsync}/bin/rsync -razv --numeric-ids --delete /data/subversion /data/subversion-strategoxt /data/subversion-nix /data/vm /data/pt-wiki /data/postgresql unixhome.st.ewi.tudelft.nl::bfarm/) >> /var/log/backup.log 2>&1"
123
];
124
};
125
@@ -127,17 +127,17 @@ rec {
127
enable = true;
128
interfaces = ["eth0"];
129
extraConfig = ''
130
- option subnet-mask 255.255.255.0;
131
- option broadcast-address 192.168.1.255;
132
- option routers 192.168.1.5;
133
- option domain-name-servers 130.161.158.4, 130.161.33.17, 130.161.180.1;
134
- option domain-name "buildfarm-net";
135
-
136
- subnet 192.168.1.0 netmask 255.255.255.0 {
137
- range 192.168.1.100 192.168.1.200;
138
- }
130
+ option subnet-mask 255.255.255.0;
131
+ option broadcast-address 192.168.1.255;
132
+ option routers 192.168.1.5;
133
+ option domain-name-servers 130.161.158.4, 130.161.33.17, 130.161.180.1;
134
+ option domain-name "buildfarm-net";
135
+
136
+ subnet 192.168.1.0 netmask 255.255.255.0 {
137
+ range 192.168.1.100 192.168.1.200;
138
+ }
139
140
- use-host-decl-names on;
140
+ use-host-decl-names on;
141
'';
142
machines = pkgs.lib.filter (machine: machine ? ethernetAddress) machineList;
143
};
@@ -157,11 +157,11 @@ rec {
157
}
158
159
{ name = "jira";
160
- users = [
161
- { name = "jira";
162
- description = "JIRA bug tracker";
163
- }
164
- ];
160
+ users = [
161
+ { name = "jira";
162
+ description = "JIRA bug tracker";
163
+ }
164
+ ];
165
job = ''
166
description "JIRA bug tracker"
167
@@ -234,20 +234,20 @@ rec {
234
235
# !!! move
236
extraSubservices = [
237
- { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/subversion.nix;
238
- config = {
239
- urlPrefix = "";
237
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/subversion.nix;
238
+ config = {
239
+ urlPrefix = "";
240
toplevelRedirect = false;
241
- dataDir = "/data/subversion";
242
- notificationSender = "root@buildfarm.st.ewi.tudelft.nl";
243
- userCreationDomain = "st.ewi.tudelft.nl";
244
- organisation = {
245
- name = "Software Engineering Research Group, TU Delft";
246
- url = http://www.st.ewi.tudelft.nl/;
247
- logo = "/serg-logo.png";
248
- };
249
- };
250
- }
241
+ dataDir = "/data/subversion";
242
+ notificationSender = "root@buildfarm.st.ewi.tudelft.nl";
243
+ userCreationDomain = "st.ewi.tudelft.nl";
244
+ organisation = {
245
+ name = "Software Engineering Research Group, TU Delft";
246
+ url = http://www.st.ewi.tudelft.nl/;
247
+ logo = "/serg-logo.png";
248
+ };
249
+ };
250
+ }
251
];
252
253
virtualHosts = [
@@ -255,25 +255,28 @@ rec {
255
{ hostName = "buildfarm.st.ewi.tudelft.nl";
256
documentRoot = pkgs.lib.cleanSource ./webroot;
257
extraSubservices = [
258
- { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/dist-manager.nix;
259
- config = rec {
260
- urlPrefix = "/releases";
261
- distDir = "/data/webserver/dist";
262
- uploaderIPs = ["127.0.0.1" myIP];
263
- distPasswords = "/data/webserver/upload_passwords";
264
- directoriesConf = ''
265
- nix ${distDir}/nix nix-upload
266
- '';
267
- };
268
- }
269
- ];
258
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/dist-manager.nix;
259
+ config = rec {
260
+ urlPrefix = "/releases";
261
+ distDir = "/data/webserver/dist";
262
+ uploaderIPs = ["127.0.0.1" myIP];
263
+ distPasswords = "/data/webserver/upload_passwords";
264
+ directoriesConf = ''
265
+ nix ${distDir}/nix nix-upload
266
+ nix-cache ${distDir}/nix-cache nix-upload strategoxt-upload meta-environment-upload
267
+ strategoxt ${distDir}/strategoxt strategoxt-upload
268
+ meta-environment ${distDir}/meta-environment meta-environment-upload
269
+ '';
270
+ };
271
+ }
272
+ ];
273
}
274
275
{ hostName = "strategoxt.org";
276
extraSubservices = [
274
- { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/twiki.nix;
275
- config = { startWeb = "Stratego/WebHome"; };
276
- }
277
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/twiki.nix;
278
+ config = { startWeb = "Stratego/WebHome"; };
279
+ }
280
];
281
}
282
@@ -286,45 +289,63 @@ rec {
289
290
{ hostName = "svn.strategoxt.org";
291
extraSubservices = [
289
- { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/subversion.nix;
290
- config = {
291
- urlPrefix = "";
292
- dataDir = "/data/subversion-strategoxt";
293
- notificationSender = "root@buildfarm.st.ewi.tudelft.nl";
294
- userCreationDomain = "st.ewi.tudelft.nl";
295
- organisation = {
296
- name = "Stratego/XT";
297
- url = http://strategoxt.org/;
298
- logo = "http://strategoxt.org/pub/Stratego/StrategoLogo/StrategoLogoTextlessWhite-100px.png";
299
- };
300
- };
301
- }
292
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/subversion.nix;
293
+ config = {
294
+ urlPrefix = "";
295
+ dataDir = "/data/subversion-strategoxt";
296
+ notificationSender = "root@buildfarm.st.ewi.tudelft.nl";
297
+ userCreationDomain = "st.ewi.tudelft.nl";
298
+ organisation = {
299
+ name = "Stratego/XT";
300
+ url = http://strategoxt.org/;
301
+ logo = "http://strategoxt.org/pub/Stratego/StrategoLogo/StrategoLogoTextlessWhite-100px.png";
302
+ };
303
+ };
304
+ }
305
];
306
}
307
308
{ hostName = "program-transformation.org";
309
serverAliases = ["www.program-transformation.org"];
310
extraSubservices = [
308
- { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/twiki.nix;
309
- config = { startWeb = "Transform/WebHome"; };
310
- }
311
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/twiki.nix;
312
+ config = { startWeb = "Transform/WebHome"; };
313
+ }
314
];
315
}
316
317
{ hostName = "bugs.strategoxt.org";
318
extraConfig = ''
316
- <Proxy *>
317
- Order deny,allow
318
- Allow from all
319
- </Proxy>
320
-
321
- ProxyRequests Off
322
- ProxyPreserveHost On
323
- ProxyPass / http://localhost:10080/
324
- ProxyPassReverse / http://localhost:10080/
319
+ <Proxy *>
320
+ Order deny,allow
321
+ Allow from all
322
+ </Proxy>
323
+
324
+ ProxyRequests Off
325
+ ProxyPreserveHost On
326
+ ProxyPass / http://localhost:10080/
327
+ ProxyPassReverse / http://localhost:10080/
328
'';
329
}
330
331
+ { hostName = "svn.nixos.org";
332
+ extraSubservices = [
333
+ { function = import /etc/nixos/nixos/upstart-jobs/apache-httpd/subversion.nix;
334
+ config = {
335
+ urlPrefix = "";
336
+ dataDir = "/data/subversion-nix";
337
+ notificationSender = "root@buildfarm.st.ewi.tudelft.nl";
338
+ userCreationDomain = "st.ewi.tudelft.nl";
339
+ organisation = {
340
+ name = "Nix";
341
+ url = http://nixos.org/;
342
+ logo = "http://www.st.ewi.tudelft.nl/serg-logo.png"; # !!! need a logo
343
+ };
344
+ };
345
+ }
346
+ ];
347
+ }
348
+
349
];
350
};
351
};