1 import ../make-test-python.nix ({ lib, ... }: let
2 peer1-ip = "538:f40f:1c51:9bd9:9569:d3f6:d0a1:b2df";
3 peer2-ip = "5b6:6776:fee0:c1f3:db00:b6a8:d013:d38f";
7 meta.maintainers = with lib.maintainers; [ lassulus ];
11 peer1 = { config, pkgs, ... }: {
12 virtualisation.vlans = [ 1 ];
13 networking.interfaces.eth1.ipv4.addresses = [{
14 address = "192.168.1.11";
20 addHostedPublicNodes = false;
22 keyFile = ./peer1.key;
24 "quic://192.168.1.12:9651"
25 "tcp://192.168.1.12:9651"
30 peer2 = { config, pkgs, ... }: {
31 virtualisation.vlans = [ 1 ];
32 networking.interfaces.eth1.ipv4.addresses = [{
33 address = "192.168.1.12";
39 addHostedPublicNodes = false;
41 keyFile = ./peer2.key;
49 peer1.wait_for_unit("network-online.target")
50 peer2.wait_for_unit("network-online.target")
51 peer1.wait_for_unit("mycelium.service")
52 peer2.wait_for_unit("mycelium.service")
54 peer1.succeed("mycelium peers list | grep 192.168.1.12")
55 peer2.succeed("mycelium peers list | grep 192.168.1.11")
57 peer1.succeed("ping -c5 ${peer2-ip}")
58 peer2.succeed("ping -c5 ${peer1-ip}")