@cryptotaxi247 / infra-1 / commits / 017e93f5

* Trailing whitespace.

svn path=/configurations/trunk/tud/; revision=34675

Eelco Dolstra committed Jan 14, 2013 at 15:08 UTC 017e93f55c2450a0753b79ca945004424ad297cb
1 file changed +32 -31
cartman.nix
+32 -31
@@ -2,7 +2,8 @@
2
3 with pkgs.lib;
4
5 -let
5 +let
6 +
7 duplicityBackup = pkgs.writeScript "backup-duplicity" ''
8 #! /bin/sh
9 echo "Starting backups"
@@ -33,7 +34,7 @@ let
34 # Produce the list of Nix build machines in the format expected by
35 # the Nix daemon Upstart job.
36 buildMachines =
36 - let addKey = machine: machine //
37 + let addKey = machine: machine //
38 { sshKey = "/root/.ssh/id_buildfarm";
39 sshUser = machine.buildUser;
40 };
@@ -97,7 +98,7 @@ let
98 </Proxy>
99
100 ProxyPreserveHost On
100 -
101 +
102 ProxyPass /mturk http://wendy:3000/mturk retry=5
103 ProxyPassReverse /mturk http://wendy:3000/mturk
104 ProxyPass /mturk-sandbox http://wendy:3001/mturk-sandbox retry=5
@@ -134,7 +135,7 @@ let
135
136 strategoxtVHostConfig =
137 { hostName = "strategoxt.org";
137 - servedFiles = [
138 + servedFiles = [
139 { urlPath = "/freenode.ver";
140 file = "/data/pt-wiki/pub/freenode.ver";
141 }
@@ -154,13 +155,13 @@ let
155 { enableSSL = true;
156 sslServerCert = "/root/ssl-secrets/ssl-strategoxt-org.crt";
157 sslServerKey = "/root/ssl-secrets/ssl-strategoxt-org.key";
157 - extraConfig =
158 + extraConfig =
159 ''
160 SSLCertificateChainFile /root/ssl-secrets/startssl-class1.pem
161 SSLCACertificateFile /root/ssl-secrets/startssl-ca.pem
162 '';
163 };
163 -
164 +
165 in
166
167 rec {
@@ -196,7 +197,7 @@ rec {
197 swapDevices = [
198 { label = "swap1"; }
199 ];
199 -
200 +
201 nix = {
202 maxJobs = 2;
203 distributedBuilds = true;
@@ -205,7 +206,7 @@ rec {
206 gc-keep-outputs = true
207 '';
208 };
208 -
209 +
210 networking = {
211 hostName = "cartman";
212 domain = "buildfarm";
@@ -242,11 +243,11 @@ rec {
243 nat.internalIPs = "192.168.1.0/22";
244 nat.externalInterface = "external";
245 nat.externalIP = myIP;
245 -
246 +
247 localCommands =
248 ''
249 ${pkgs.iptables}/sbin/iptables -t nat -F PREROUTING
249 -
250 +
251 # lucifer ssh (to give Karl/Armijn access for the BAT project)
252 ${pkgs.iptables}/sbin/iptables -t nat -A PREROUTING -p tcp -d ${myIP} --dport 2222 -j DNAT --to 192.168.1.26:22
253
@@ -263,7 +264,7 @@ rec {
264
265 # Discard all traffic to networks in our prefix that don't exist.
266 ip -6 route add 2001:610:685::/48 dev lo || true
266 -
267 +
268 # Create a local network (prefix:1::/64).
269 ip -6 addr add 2001:610:685:1::1/64 dev internal || true
270
@@ -295,7 +296,7 @@ rec {
296 };
297 '';
298 };
298 -
299 +
300 cron = {
301 mailto = "rob.vermaas@gmail.com";
302 systemCronJobs =
@@ -322,14 +323,14 @@ rec {
323 extraConfig =
324 ''
325 AddType application/nix-package .nixpkg
325 -
326 +
327 <Location /server-status>
328 SetHandler server-status
328 - Allow from 127.0.0.1 # If using a remote host for monitoring replace 127.0.0.1 with its IP.
329 + Allow from 127.0.0.1 # If using a remote host for monitoring replace 127.0.0.1 with its IP.
330 Order deny,allow
331 Deny from all
332 </Location>
332 -
333 +
334 ExtendedStatus On
335
336 StartServers 15
@@ -340,7 +341,7 @@ rec {
341 #max_execution_time = 2
342 memory_limit = "32M"
343 '';
343 -
344 +
345 servedFiles =
346 [ { urlPath = "/releases.css";
347 file = releasesCSS;
@@ -352,14 +353,14 @@ rec {
353 file = releasesCSS;
354 }
355 ];
355 -
356 +
357 virtualHosts = [
358
359 { # Catch-all site.
360 hostName = "www.nixos.org";
361 globalRedirect = "http://nixos.org/";
362 }
362 -
363 +
364 nixosVHostConfig
365
366 (nixosVHostConfig // {
@@ -388,7 +389,7 @@ rec {
389 }
390 ];
391 })
391 -
392 +
393 { hostName = "buildfarm.st.ewi.tudelft.nl";
394 documentRoot = cleanSource ./webroot;
395 enableUserDir = true;
@@ -438,7 +439,7 @@ rec {
439 { hostName = "svn.strategoxt.org";
440 globalRedirect = "https://svn.strategoxt.org/";
441 }
441 -
442 +
443 ( strategoxtSSLConfig //
444 { hostName = "svn.strategoxt.org";
445 extraSubservices = [
@@ -515,12 +516,12 @@ rec {
516 { hostName = "svn.nixos.org";
517 globalRedirect = "https://nixos.org/repoman";
518 }
518 -
519 +
520 { hostName = "hydra.nixos.org";
521 logFormat = ''"%h %l %u %t \"%r\" %>s %b %D"'';
522 extraConfig = ''
523 TimeOut 900
523 -
524 +
525 <Proxy *>
526 Order deny,allow
527 Allow from all
@@ -530,7 +531,7 @@ rec {
531 ProxyPreserveHost On
532 ProxyPass / http://lucifer:3000/ retry=5 disablereuse=on
533 ProxyPassReverse / http://lucifer:3000/
533 -
534 +
535 <Location />
536 SetOutputFilter DEFLATE
537 BrowserMatch ^Mozilla/4\.0[678] no-gzip\
@@ -631,34 +632,34 @@ rec {
632 Redirect permanent / http://nixos.org/mturk/
633 '';
634 }
634 -
635 +
636 { hostName = "mturk-view-sandbox.nixos.org";
637 extraConfig = ''
638 Redirect permanent / http://nixos.org/mturk-sandbox/
639 '';
640 }
640 -
641 +
642 ];
643 };
644
645 zabbixAgent.enable = true;
645 -
646 +
647 zabbixServer.enable = true;
648 zabbixServer.dbServer = "wendy";
649 zabbixServer.dbPassword = import ./zabbix-password.nix;
650
651 flashpolicyd.enable = true;
651 -
652 +
653 };
654
655 # Needed for the Nixpkgs mirror script.
656 environment.pathsToLink = [ "/libexec" ];
657
658 environment.systemPackages = [ pkgs.dnsmasq pkgs.duplicity];
658 -
659 +
660 jobs.dnsmasq =
661 let
661 -
662 +
663 confFile = pkgs.writeText "dnsmasq.conf"
664 ''
665 keep-in-foreground
@@ -680,10 +681,10 @@ rec {
681 dhcp-host=${m.ethernetAddress},${m.ipAddress},${m.hostName}
682 '')}
683 '';
683 -
684 +
685 hostsFile = pkgs.writeText "extra-hosts"
686 (flip concatMapStrings machines (m: "${m.ipAddress} ${m.hostName}\n"));
686 -
687 +
688 in
689 { startOn = "started network-interfaces";
690 exec = "${pkgs.dnsmasq}/bin/dnsmasq --conf-file=${confFile}";