diff options
author | Soispha <soispha@vhack.eu> | 2023-05-14 12:47:06 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-05-14 12:47:06 +0200 |
commit | 6f12ec10b8962e1c328c429886bb6daca28b5d6d (patch) | |
tree | bade2dc814571e82a3ab71f88391738fd2e683ad | |
parent | Build(flake): Update (diff) | |
download | nixos-config-6f12ec10b8962e1c328c429886bb6daca28b5d6d.tar.gz nixos-config-6f12ec10b8962e1c328c429886bb6daca28b5d6d.zip |
Fix(system/network): Set networks for netdev devices
Diffstat (limited to '')
-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" - ]; }; }; } |