Merge pull request #6919 from ehmry/cjdns
cjdns: update pkg and fix nixos test
This commit is contained in:
commit
9d9a393a4b
@ -242,7 +242,7 @@ in rec {
|
|||||||
tests.blivet = callTest tests/blivet.nix {};
|
tests.blivet = callTest tests/blivet.nix {};
|
||||||
tests.cadvisor = hydraJob (import tests/cadvisor.nix { system = "x86_64-linux"; });
|
tests.cadvisor = hydraJob (import tests/cadvisor.nix { system = "x86_64-linux"; });
|
||||||
tests.chromium = callTest tests/chromium.nix {};
|
tests.chromium = callTest tests/chromium.nix {};
|
||||||
#tests.cjdns = callTest tests/cjdns.nix {};
|
tests.cjdns = callTest tests/cjdns.nix {};
|
||||||
tests.containers = callTest tests/containers.nix {};
|
tests.containers = callTest tests/containers.nix {};
|
||||||
tests.docker = hydraJob (import tests/docker.nix { system = "x86_64-linux"; });
|
tests.docker = hydraJob (import tests/docker.nix { system = "x86_64-linux"; });
|
||||||
tests.dockerRegistry = hydraJob (import tests/docker-registry.nix { system = "x86_64-linux"; });
|
tests.dockerRegistry = hydraJob (import tests/docker-registry.nix { system = "x86_64-linux"; });
|
||||||
|
@ -3,15 +3,15 @@ let
|
|||||||
carolPubKey = "n932l3pjvmhtxxcdrqq2qpw5zc58f01vvjx01h4dtd1bb0nnu2h0.k";
|
carolPubKey = "n932l3pjvmhtxxcdrqq2qpw5zc58f01vvjx01h4dtd1bb0nnu2h0.k";
|
||||||
carolPassword = "678287829ce4c67bc8b227e56d94422ee1b85fa11618157b2f591de6c6322b52";
|
carolPassword = "678287829ce4c67bc8b227e56d94422ee1b85fa11618157b2f591de6c6322b52";
|
||||||
carolIp4 = "192.168.0.9";
|
carolIp4 = "192.168.0.9";
|
||||||
|
|
||||||
basicConfig =
|
basicConfig =
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{ services.cjdns.enable = true;
|
{ services.cjdns.enable = true;
|
||||||
|
|
||||||
# Turning off DHCP isn't very realistic but makes
|
# Turning off DHCP isn't very realistic but makes
|
||||||
# the sequence of address assignment less stochastic.
|
# the sequence of address assignment less stochastic.
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
|
|
||||||
networking.interfaces.eth1.prefixLength = 24;
|
networking.interfaces.eth1.prefixLength = 24;
|
||||||
# CJDNS output is incompatible with the XML log.
|
# CJDNS output is incompatible with the XML log.
|
||||||
systemd.services.cjdns.serviceConfig.StandardOutput = "null";
|
systemd.services.cjdns.serviceConfig.StandardOutput = "null";
|
||||||
@ -41,19 +41,18 @@ import ./make-test.nix {
|
|||||||
# Bob explicitly connects to Carol over UDPInterface.
|
# Bob explicitly connects to Carol over UDPInterface.
|
||||||
bob =
|
bob =
|
||||||
{ config, lib, nodes, ... }:
|
{ config, lib, nodes, ... }:
|
||||||
|
|
||||||
let carolIp4 = lib.mkForce nodes.carol.config.networking.interfaces.eth1; in
|
let carolIp4 = lib.mkForce nodes.carol.config.networking.interfaces.eth1; in
|
||||||
|
|
||||||
{ imports = [ basicConfig ];
|
{ imports = [ basicConfig ];
|
||||||
|
|
||||||
networking.interfaces.eth1.ipAddress = "192.168.0.2";
|
networking.interfaces.eth1.ipAddress = "192.168.0.2";
|
||||||
|
|
||||||
services.cjdns =
|
services.cjdns =
|
||||||
{ UDPInterface =
|
{ UDPInterface =
|
||||||
{ bind = "0.0.0.0:1024";
|
{ bind = "0.0.0.0:1024";
|
||||||
connectTo."192.168.0.1:1024}" =
|
connectTo."192.168.0.1:1024}" =
|
||||||
{ hostname = "carol.hype";
|
{ password = carolPassword;
|
||||||
password = carolPassword;
|
|
||||||
publicKey = carolPubKey;
|
publicKey = carolPubKey;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -75,7 +74,7 @@ import ./make-test.nix {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
networking.interfaces.eth1.ipAddress = "192.168.0.1";
|
networking.interfaces.eth1.ipAddress = "192.168.0.1";
|
||||||
|
|
||||||
services.cjdns =
|
services.cjdns =
|
||||||
{ authorizedPasswords = [ carolPassword ];
|
{ authorizedPasswords = [ carolPassword ];
|
||||||
ETHInterface.bind = "eth1";
|
ETHInterface.bind = "eth1";
|
||||||
@ -106,13 +105,13 @@ import ./make-test.nix {
|
|||||||
my $carolIp6 = cjdnsIp $carol;
|
my $carolIp6 = cjdnsIp $carol;
|
||||||
|
|
||||||
# ping a few times each to let the routing table establish itself
|
# ping a few times each to let the routing table establish itself
|
||||||
|
|
||||||
$alice->succeed("ping6 -c 4 $carolIp6");
|
$alice->succeed("ping6 -c 4 $carolIp6");
|
||||||
$bob->succeed("ping6 -c 4 carol.hype");
|
$bob->succeed("ping6 -c 4 $carolIp6");
|
||||||
|
|
||||||
$carol->succeed("ping6 -c 4 $aliceIp6");
|
$carol->succeed("ping6 -c 4 $aliceIp6");
|
||||||
$carol->succeed("ping6 -c 4 $bobIp6");
|
$carol->succeed("ping6 -c 4 $bobIp6");
|
||||||
|
|
||||||
$alice->succeed("ping6 -c 4 $bobIp6");
|
$alice->succeed("ping6 -c 4 $bobIp6");
|
||||||
$bob->succeed("ping6 -c 4 $aliceIp6");
|
$bob->succeed("ping6 -c 4 $aliceIp6");
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{ stdenv, fetchFromGitHub, nodejs, which, python27, utillinux }:
|
{ stdenv, fetchFromGitHub, nodejs, which, python27, utillinux }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "15"; # see ${src}/util/version/Version.h
|
version = "16"; # see ${src}/util/version/Version.h
|
||||||
date = "20150207";
|
date = "20150308";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "cjdns-${version}-${date}";
|
name = "cjdns-${version}-${date}";
|
||||||
@ -10,8 +10,8 @@ stdenv.mkDerivation {
|
|||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "cjdelisle";
|
owner = "cjdelisle";
|
||||||
repo = "cjdns";
|
repo = "cjdns";
|
||||||
rev = "0fc585e15e25b1bd39be24a534f47bb966485a4a";
|
rev = "dc7eaf676cb83f13ba3e76a1bd0f2e093e6d6e1b";
|
||||||
sha256 = "090zx30bgfk6wyh10wbjqpkvjq9l30jc7fh2iagajsmpjs9iipqm";
|
sha256 = "1llhv9kflh4rzv9b9qq9zhrckcc6a7xs0dp147adwmaxqjj8v601";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ which python27 nodejs ] ++
|
buildInputs = [ which python27 nodejs ] ++
|
||||||
|
Loading…
x
Reference in New Issue
Block a user