about summary refs log tree commit diff stats
path: root/system/network/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'system/network/default.nix')
-rw-r--r--system/network/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/system/network/default.nix b/system/network/default.nix
new file mode 100644
index 00000000..c93d4e23
--- /dev/null
+++ b/system/network/default.nix
@@ -0,0 +1,30 @@
+# vim: ts=2
+{config, ...}: {
+  systemd.network.netdevs = {
+    "tab0" = {
+      netdevConfig = {
+        Name = "tap0";
+        Kind = "tap";
+      };
+      tapConfig = {
+        User = "${config.users.users.soispha.username}";
+        Group = "libvirt";
+      };
+    };
+    "br0" = {
+      netdevConfig = {
+        Name = "br0";
+        Kind = "bridge";
+      };
+    };
+  };
+  networking.bridges = {
+    br1 = {
+      interfaces = [
+        # TODO don't use hardcoded names
+        "enp4s0"
+        "tap0"
+      ];
+    };
+  };
+}