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:
parent
3d27f32c03
commit
4254ebabaa
5 changed files with 93 additions and 37 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -10,11 +10,13 @@ with scriptsNFiles;
|
|||
upload ${grub-ifnames-0}:/etc/default/grub.d/90-ifnames-0.cfg
|
||||
upload ${grub-disable-microcode}:/etc/default/grub.d/00-disable-microcode.cfg
|
||||
run-command mount /boot/efi && update-grub
|
||||
upload ${eth0-dhcp-network}:/etc/systemd/network/00-eth0-dhcp.network
|
||||
upload ${dhcp-network-for-iface { iface = "eth0"; }}:/etc/systemd/network/00-eth0-dhcp.network
|
||||
run ${ssh-service-override-conf-create}
|
||||
upload ${grow-root-sh}:/usr/local/sbin/grow-root.sh
|
||||
upload ${grow-root-service}:/etc/systemd/system/grow-root.service
|
||||
run-command systemctl enable grow-root.service
|
||||
truncate /etc/machine-id
|
||||
delete /var/lib/dbus/machine-id
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue