@cryptotaxi247 / infra / commits / acd3cb67

Make sure that the bridge on stan is maintained after nixos-rebuild

Eelco Dolstra committed Nov 4, 2013 at 11:37 UTC acd3cb67d83760bb6f1f74154f1cc36c2157245e
1 file changed +10 -15
delft/stan.nix
+10 -15
@@ -22,22 +22,17 @@
22
23 networking.bridges.veno1.interfaces = [ config.system.build.mainPhysicalInterface ];
24
25 + # Libvirt dynamically creates vnet* interfaces to connect interfaces
26 + # to the veno1 bridge. So after restarting veno1, we have to add
27 + # those interfaces back in.
28 + systemd.services.veno1.postStart =
29 + ''
30 + for iface in $(cd /sys/class/net && echo vnet*); do
31 + brctl addif veno1 "$iface" || true
32 + done
33 + '';
34 +
35 system.build.mainVirtualInterface = "veno1";
36
37 virtualisation.libvirtd.enable = true;
28 -
29 - /*
30 - networking.localCommands =
31 - ''
32 - # Enable IPv6 forwarding. Nova/radvd requires this.
33 - echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
34 -
35 - # Urgh. The Linux kernel disables processing of router
36 - # advertisements if forwarding is enabled, so we have to
37 - # configure manually. Apparently in newer kernels, we can set
38 - # /proc/sys/net/ipv6/conf/all/accept_ra to 2 instead.
39 - ip -6 addr add 2001:610:685:1:222:19ff:fe55:bf2e/64 dev veno1 || true
40 - ip -6 route add default via fe80::204:23ff:fedf:f7bf dev veno1 || true
41 - '';
42 - */
38 }