1 import ./make-test-python.nix ({ pkgs, lib, ...}: {
2 meta.maintainers = with lib.maintainers; [ hexa ];
7 router = { config, pkgs, ... }: {
8 virtualisation.vlans = [ 1 ];
13 firewall.allowedUDPPorts = [ 67 ];
21 Address = "10.0.0.1/30";
27 services.kea.dhcp4 = {
30 valid-lifetime = 3600;
37 name = "/var/lib/kea/dhcp4.leases";
41 dhcp-socket-type = "raw";
48 subnet = "10.0.0.0/30";
50 pool = "10.0.0.2 - 10.0.0.2";
57 client = { config, pkgs, ... }: {
58 virtualisation.vlans = [ 1 ];
59 systemd.services.systemd-networkd.environment.SYSTEMD_LOG_LEVEL = "debug";
63 firewall.enable = false;
64 interfaces.eth1.useDHCP = true;
68 testScript = { ... }: ''
70 router.wait_for_unit("kea-dhcp4-server.service")
71 client.wait_for_unit("systemd-networkd-wait-online.service")
72 client.wait_until_succeeds("ping -c 5 10.0.0.1")
73 router.wait_until_succeeds("ping -c 5 10.0.0.2")