svn path=/configurations/trunk/tud/; revision=10698
svn path=/configurations/trunk/tud/; revision=10698
Eelco Dolstra committed
Feb 14, 2008 at 20:59 UTC
f4e0479cd32690065c580d7f3112fe3e5a76056c
2 files changed
+35
-21
main.nix
+35
-21
@@ -23,6 +23,8 @@ let
23
fromAddress = "TU Delft Nix Buildfarm <martin@st.ewi.tudelft.nl>";
24
};
25
26
+ myIP = "130.161.158.181";
27
+
28
in
29
30
rec {
@@ -57,7 +59,7 @@ rec {
59
60
interfaces = [
61
{ name = "eth1";
60
- ipAddress = "130.161.158.181";
62
+ ipAddress = myIP;
63
subnetMask = "255.255.254.0";
64
}
65
{ name = "eth1:1";
@@ -92,10 +94,10 @@ rec {
94
95
iptables -t nat -F
96
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d 192.168.1.0/24 -j ACCEPT
95
- iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to-source 130.161.158.181
97
+ iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j SNAT --to-source ${myIP}
98
99
# WebDSL server.
98
- iptables -t nat -A PREROUTING -d 130.161.158.185 -i eth1 -p tcp --dport 80 -j DNAT --to-destination 130.161.158.181:8080
100
+ iptables -t nat -A PREROUTING -d 130.161.158.185 -i eth1 -p tcp --dport 80 -j DNAT --to-destination ${myIP}:8080
101
102
echo 1 > /proc/sys/net/ipv4/ip_forward
103
";
@@ -191,31 +193,42 @@ rec {
193
194
httpd = {
195
enable = true;
196
+ experimental = true;
197
adminAddr = "eelco@cs.uu.nl";
198
hostName = "buildfarm.st.ewi.tudelft.nl";
199
197
- subservices = {
198
- subversion = {
199
- enable = true;
200
- dataDir = "/data/subversion";
201
- notificationSender = "svn@example.org";
202
- userCreationDomain = "st.ewi.tudelft.nl";
203
-
204
- organization = {
205
- name = "Software Engineering Research Group, TU Delft";
206
- url = "http://swerl.tudelft.nl";
207
- logo = ./serg-logo.png;
200
+ documentRoot = pkgs.lib.cleanSource ./webroot;
201
+
202
+ 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
};
209
- };
210
- };
211
-
212
- extraSubservices = {
213
- enable = true;
214
- services = [distManagerService rootFiles];
215
- };
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
+ '';
225
+ };
226
+ }
227
+ ];
228
};
229
};
230
231
+ /*
232
distManagerService = webServer : pkgs :
233
(distManager webServer pkgs) {
234
distDir = "/data/webserver/dist";
@@ -239,5 +252,6 @@ rec {
252
urlPath = "/";
253
inherit (pkgs) stdenv;
254
};
255
+ */
256
257
}