diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/network/default.nix | 54 |
1 files changed, 33 insertions, 21 deletions
diff --git a/system/network/default.nix b/system/network/default.nix index c93d4e23..5ddb06a3 100644 --- a/system/network/default.nix +++ b/system/network/default.nix @@ -1,30 +1,42 @@ # vim: ts=2 {config, ...}: { - systemd.network.netdevs = { - "tab0" = { - netdevConfig = { - Name = "tap0"; - Kind = "tap"; + systemd.network = { + networks = { + "tap0" = { + name = "tap0"; + bridge = [ + "virbr0" + ]; }; - tapConfig = { - User = "${config.users.users.soispha.username}"; - Group = "libvirt"; + "enp4s0" = { + name = "enp4s0"; + networkConfig = { + DHCP = "yes"; + DNSOverTLS = "yes"; + DNSSEC = "yes"; + }; + bridge = [ + "virbr0" + ]; }; }; - "br0" = { - netdevConfig = { - Name = "br0"; - Kind = "bridge"; + netdevs = { + "tap0" = { + netdevConfig = { + Name = "tap0"; + Kind = "tap"; + }; + tapConfig = { + User = "${config.users.users.soispha.username}"; + Group = "libvirt"; + }; + }; + "virbr0" = { + netdevConfig = { + Name = "br0"; + Kind = "bridge"; + }; }; - }; - }; - networking.bridges = { - br1 = { - interfaces = [ - # TODO don't use hardcoded names - "enp4s0" - "tap0" - ]; }; }; } |