about summary refs log tree commit diff
path: root/nixos/tests/cjdns.nix
diff options
context:
space:
mode:
authorEmery Hemingway <emery@vfemail.net>2015-03-21 10:13:03 -0400
committerEmery Hemingway <emery@vfemail.net>2015-03-21 10:17:48 -0400
commitba2074fc310796f1cb43b82b86cb85cfc0a8ca53 (patch)
treea685755ed8cfac28dd71f1a933bc082673e6d917 /nixos/tests/cjdns.nix
parent7e66337f6c5db5ac5c80ae57fcc8f6c3b2ae238a (diff)
nixos/tests/cjdns: do not build cjdns at evaluation
Putting hostnames in the cjdns configuration requires a utility
be present to convert public keys to ip addresses
Diffstat (limited to 'nixos/tests/cjdns.nix')
-rw-r--r--nixos/tests/cjdns.nix25
1 files changed, 12 insertions, 13 deletions
diff --git a/nixos/tests/cjdns.nix b/nixos/tests/cjdns.nix
index 7bb3863c683fd..45164234b1bd1 100644
--- a/nixos/tests/cjdns.nix
+++ b/nixos/tests/cjdns.nix
@@ -3,15 +3,15 @@ let
   carolPubKey = "n932l3pjvmhtxxcdrqq2qpw5zc58f01vvjx01h4dtd1bb0nnu2h0.k";
   carolPassword = "678287829ce4c67bc8b227e56d94422ee1b85fa11618157b2f591de6c6322b52";
   carolIp4 = "192.168.0.9";
-  
+
   basicConfig =
     { config, pkgs, ... }:
     { services.cjdns.enable = true;
-    
+
       # Turning off DHCP isn't very realistic but makes
       # the sequence of address assignment less stochastic.
       networking.useDHCP = false;
-      
+
       networking.interfaces.eth1.prefixLength = 24;
       # CJDNS output is incompatible with the XML log.
       systemd.services.cjdns.serviceConfig.StandardOutput = "null";
@@ -41,19 +41,18 @@ import ./make-test.nix {
       # Bob explicitly connects to Carol over UDPInterface.
       bob =
         { config, lib, nodes, ... }:
-        
+
         let carolIp4 = lib.mkForce nodes.carol.config.networking.interfaces.eth1; in
-        
+
           { imports = [ basicConfig ];
-          
+
           networking.interfaces.eth1.ipAddress = "192.168.0.2";
-          
+
           services.cjdns =
             { UDPInterface =
                 { bind = "0.0.0.0:1024";
                   connectTo."192.168.0.1:1024}" =
-                    { hostname = "carol.hype";
-                      password = carolPassword;
+                    { password = carolPassword;
                       publicKey = carolPubKey;
                     };
                 };
@@ -75,7 +74,7 @@ import ./make-test.nix {
           '';
 
           networking.interfaces.eth1.ipAddress = "192.168.0.1";
-                    
+
           services.cjdns =
             { authorizedPasswords = [ carolPassword ];
               ETHInterface.bind = "eth1";
@@ -106,13 +105,13 @@ import ./make-test.nix {
       my $carolIp6 = cjdnsIp $carol;
 
       # ping a few times each to let the routing table establish itself
-      
+
       $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 $bobIp6");
-      
+
       $alice->succeed("ping6 -c 4 $bobIp6");
       $bob->succeed("ping6 -c 4 $aliceIp6");