* Use machines.nix to generate dhcpd.conf.
svn path=/configurations/trunk/tud/; revision=9859
Eelco Dolstra committed
Dec 4, 2007 at 15:05 UTC
ab22a77b4137653dff97c765ddf28940209345d7
3 files changed
+16
-54
dhcpd.conf
deleted
-51
@@ -1,51 +0,0 @@
1
-default-lease-time 600;
2
-max-lease-time 7200;
3
-
4
-authoritative;
5
-
6
-ddns-update-style ad-hoc;
7
-
8
-option subnet-mask 255.255.255.0;
9
-option broadcast-address 192.168.1.255;
10
-option routers 192.168.1.5;
11
-option domain-name-servers 130.161.158.4, 130.161.33.17, 130.161.180.1;
12
-option domain-name "buildfarm-net";
13
-
14
-subnet 192.168.1.0 netmask 255.255.255.0 {
15
- range 192.168.1.100 192.168.1.200;
16
-}
17
-
18
-host bm-linux32-1 {
19
- hardware ethernet 00:16:76:9A:32:1D;
20
- fixed-address 192.168.1.14;
21
-}
22
-
23
-host bm-linux32-2 {
24
- hardware ethernet 00:19:D1:1D:C4:9A;
25
- fixed-address 192.168.1.15;
26
-}
27
-
28
-host bm-linux64-1 {
29
- hardware ethernet 00:19:D1:10:37:49;
30
- fixed-address 192.168.1.12;
31
-}
32
-
33
-host bm-linux64-2 {
34
- hardware ethernet 00:19:D1:19:2A:31;
35
- fixed-address 192.168.1.13;
36
-}
37
-
38
-host bm-mac86-1 {
39
- hardware ethernet 00:16:cb:a6:13:28;
40
- fixed-address 192.168.1.16;
41
-}
42
-
43
-host bm-mac86-2 {
44
- hardware ethernet 00:16:cb:a6:13:d7;
45
- fixed-address 192.168.1.17;
46
-}
47
-
48
-host bm-winxp64-1 {
49
- hardware ethernet 00:19:d1:10:37:54;
50
- fixed-address 192.168.1.11;
51
-}
main.nix
+14
-1
@@ -106,8 +106,21 @@ rec {
106
107
dhcpd = {
108
enable = true;
109
- configFile = ./dhcpd.conf;
109
interfaces = ["eth0"];
110
+ extraConfig = "
111
+ option subnet-mask 255.255.255.0;
112
+ option broadcast-address 192.168.1.255;
113
+ option routers 192.168.1.5;
114
+ option domain-name-servers 130.161.158.4, 130.161.33.17, 130.161.180.1;
115
+ option domain-name \"buildfarm-net\";
116
+
117
+ subnet 192.168.1.0 netmask 255.255.255.0 {
118
+ range 192.168.1.100 192.168.1.200;
119
+ }
120
+
121
+ use-host-decl-names on;
122
+ ";
123
+ machines = pkgs.lib.filter (machine: machine ? ethernetAddress) machineList;
124
};
125
126
extraJobs = [
mass-update.sh
+2
-2
@@ -2,7 +2,7 @@
2
3
export SSH_AUTH_SOCK= # hack
4
5
-for i in 127.0.0.1 192.168.1.12 192.168.1.13 192.168.1.14 192.168.1.15 "127.0.0.1 -p 2222"; do
5
+for i in localhost jimmy timmy terrance phillip "localhost -p 2222"; do
6
echo "=== Updating $i ==="
7
- ssh -i /root/.ssh/id_mass_update root@$i sh --login -c '"cd /etc/nixos && svn up nixos nixpkgs configurations release && nix-channel --update && nixos-rebuild switch"'
7
+ ssh -i /root/.ssh/id_mass_update root@$i sh --login -c '"cd /etc/nixos && svn up nixos nixpkgs configurations release && nixos-rebuild switch"'
8
done