improvements in networking

- macvtaps working
- only 1 dnsmasq service per namespace
- vms binds to networking services
- lans with domains
- vms no longer assigned same ip (machine id issues)
-
This commit is contained in:
Sagar Ch 2024-06-10 22:27:39 +00:00
parent 3d27f32c03
commit 4254ebabaa
5 changed files with 93 additions and 37 deletions

View file

@ -11,12 +11,24 @@
'';
# dhcp for eth0
eth0-dhcp-network = pkgs.writeText "eth0-network" ''
dhcp-network-for-iface = { iface, routeMetric ? 1024, useDNS ? true }: pkgs.writeText "${iface}-network" ''
[Match]
Name=eth0
Name=${iface}
[Network]
DHCP=yes
[DHCP]
RouteMetric=${toString routeMetric}
${if useDNS then ''
[DHCPv4]
UseDNS=True
UseDomains=True
'' else ''
[DHCPv4]
UseDNS=false
''}
'';
# generate ssh host keys before starting sshd