···
1
-
import ./make-test.nix ({ pkgs, lib, ... }:
1
+
import ./make-test-python.nix ({ pkgs, lib, ... }:
let inherit (import ./ssh-keys.nix pkgs)
snakeOilPrivateKey snakeOilPublicKey;
ssh-config = builtins.toFile "ssh.conf" ''
···
client.nix.package = pkgs.nix;
23
-
$client->succeed("mkdir -m 700 /root/.ssh");
24
-
$client->copyFileFromHost("${ssh-config}", "/root/.ssh/config");
25
-
$client->succeed("cat ${snakeOilPrivateKey} > /root/.ssh/id_ecdsa");
26
-
$client->succeed("chmod 600 /root/.ssh/id_ecdsa");
23
+
client.succeed("mkdir -m 700 /root/.ssh")
25
+
"cat ${ssh-config} > /root/.ssh/config"
28
+
"cat ${snakeOilPrivateKey} > /root/.ssh/id_ecdsa"
30
+
client.succeed("chmod 600 /root/.ssh/id_ecdsa")
28
-
$client->succeed("nix-store --add /etc/machine-id > mach-id-path");
32
+
client.succeed("nix-store --add /etc/machine-id > mach-id-path")
30
-
$server->waitForUnit("sshd");
34
+
server.wait_for_unit("sshd")
32
-
$client->fail("diff /root/other-store\$(cat mach-id-path) /etc/machine-id");
36
+
client.fail("diff /root/other-store$(cat mach-id-path) /etc/machine-id")
# Currently due to shared store this is a noop :(
34
-
$client->succeed("nix copy --to ssh-ng://nix-ssh\@server \$(cat mach-id-path)");
35
-
$client->succeed("nix-store --realise \$(cat mach-id-path) --store /root/other-store --substituters ssh-ng://nix-ssh\@server");
36
-
$client->succeed("diff /root/other-store\$(cat mach-id-path) /etc/machine-id");
38
+
client.succeed("nix copy --to ssh-ng://nix-ssh@server $(cat mach-id-path)")
40
+
"nix-store --realise $(cat mach-id-path) --store /root/other-store --substituters ssh-ng://nix-ssh@server"
42
+
client.succeed("diff /root/other-store$(cat mach-id-path) /etc/machine-id")