svn path=/configurations/trunk/tud/; revision=18214
svn path=/configurations/trunk/tud/; revision=18214
Rob Vermaas committed
Nov 6, 2009 at 16:10 UTC
b7219abaeb53d806caa4e2516ab52d83ecb08e41
1 file changed
+143
build-db-dell-R410.nix
new
+143
@@ -0,0 +1,143 @@
1
+{ config, pkgs, ... }:
2
+
3
+{
4
+# require = [ ./build-machines-common.nix ];
5
+ require = [ ./couchdb.nix ] ;
6
+
7
+ boot.initrd.extraKernelModules = ["uhci_hcd" "ehci_hcd" "ata_piix" "mptsas" "usbhid" "ext3"];
8
+ boot.kernelModules = ["acpi-cpufreq" "kvm-intel"];
9
+
10
+ nix.maxJobs = 4;
11
+
12
+ fileSystems =
13
+ [ { mountPoint = "/";
14
+ label = "nixos";
15
+ options = "noatime";
16
+ }
17
+ { mountPoint = "/data";
18
+ label = "data";
19
+ options = "noatime";
20
+ }
21
+ ];
22
+
23
+ environment.extraPackages = [ pkgs.hdparm ];
24
+
25
+ services.couchdb = {
26
+ enable = true;
27
+ };
28
+
29
+ services.mysql = {
30
+ enable = true;
31
+ dataDir = "/data/mysql";
32
+ };
33
+
34
+ services.httpd = rec {
35
+ enable = true;
36
+ adminAddr = "rob.vermaas@gmail.com";
37
+
38
+ logPerVirtualHost = true;
39
+ logDir = "/data/www/logs";
40
+ logFormat = "combined";
41
+
42
+ extraSubservices = [
43
+ { serviceType = "tomcat-connector";
44
+ inherit logDir ;
45
+ stateDir = "/var/run/httpd";
46
+ }
47
+ ];
48
+
49
+ extraConfig = ''
50
+ RewriteCond %{HTTP_HOST} ^www.researchr.org$ [NC]
51
+ RewriteRule ^(.*)$ http://researchr.org/$1 [R=301,L]
52
+ '';
53
+ };
54
+
55
+ services.tomcat = {
56
+ enable = true;
57
+ baseDir = "/data/tomcat";
58
+ javaOpts = "-Dshare.dir=/nix/var/nix/profiles/default/share -Xms350m -Xmx2048m -XX:MaxPermSize=256M";
59
+ virtualHosts = [
60
+ { name = "researchr.org"; aliases = ["www.researchr.org"] ;}
61
+ { name = "webdsl.org"; }
62
+ { name = "tweetview.net"; }
63
+ { name = "pil-lang.org"; }
64
+ ];
65
+ };
66
+
67
+ services.mysqlBackup = {
68
+ enable = true;
69
+ user = "root";
70
+ databases = [ "researchr" "twitterarchive" "webdslorg" "pilweb" ];
71
+ };
72
+
73
+ users = {
74
+ extraUsers = [
75
+ { name = "rbvermaa";
76
+ uid = 1000;
77
+ group = "users";
78
+ extraGroups = [ "wheel" ];
79
+ description = "Rob Vermaas";
80
+ home = "/home/rbvermaa";
81
+ shell = pkgs.bash + "/bin/bash";
82
+ }
83
+ ];
84
+ };
85
+
86
+
87
+ ######## copied from common ###########
88
+
89
+ boot.grubDevice = "/dev/sda";
90
+ boot.kernelPackages = pkgs.kernelPackages_2_6_29;
91
+ boot.copyKernels = true;
92
+
93
+ boot.postBootCommands =
94
+ ''
95
+ echo 60 > /proc/sys/kernel/panic
96
+ '';
97
+
98
+ swapDevices = [ { label = "swap"; } ];
99
+
100
+ nix.extraOptions =
101
+ ''
102
+ build-max-silent-time = 3600
103
+ '';
104
+
105
+ services.sshd.enable = true;
106
+
107
+ services.cron.systemCronJobs =
108
+ [ "15 03 * * * root ${pkgs.nixUnstable}/bin/nix-collect-garbage --max-freed $((32 * 1024**3)) > /var/log/gc.log 2>&1"
109
+ ];
110
+
111
+ networking = {
112
+ defaultGateway = "130.161.158.1";
113
+ hostName = "webdsl";
114
+ domain = "st.ewi.tudelft.nl";
115
+ extraHosts = "127.0.0.2 webdsl.st.ewi.tudelft.nl webdsl";
116
+
117
+ interfaces = [ { ipAddress = "130.161.159.114"; name = "eth0"; subnetMask = "255.255.254.0"; } ];
118
+ nameservers = [ "130.161.158.4" "130.161.158.133" ];
119
+
120
+ useDHCP = false;
121
+ };
122
+
123
+ services.vsftpd = {
124
+ enable = true;
125
+ anonymousUser = true;
126
+ };
127
+
128
+ services.sitecopy = {
129
+ enable = true;
130
+ backups =
131
+ let genericBackup = { server = "webdata.tudelft.nl";
132
+ protocol = "webdav";
133
+ https = true ;
134
+ };
135
+ in [
136
+ ( genericBackup // { name = "ftp"; local = "/home/ftp"; remote = "/staff-groups/ewi/st/strategoxt/backup/ftp/ftp.strategoxt.org/"; } )
137
+ ( genericBackup // { name = "mysql"; local = config.services.mysqlBackup.location; remote = "/staff-groups/ewi/st/strategoxt/backup/mysql"; } )
138
+ ( genericBackup // { name = "tomcat"; local = config.services.tomcat.baseDir; remote = "/staff-groups/ewi/st/strategoxt/backup/tomcat"; } )
139
+ ];
140
+ };
141
+
142
+ environment.systemPackages = [pkgs.emacs];
143
+}