aboutsummaryrefslogtreecommitdiff
path: root/tests/nixos/remote-builds.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-01-20 15:32:31 +0100
committerRobert Hensing <robert@roberthensing.nl>2023-01-20 16:23:52 +0100
commit261c25601d9a4efd5245e3ef161fb52bf0543083 (patch)
tree96558cc1ad6efeb7c03255b46eb2768d30216359 /tests/nixos/remote-builds.nix
parent74026bb1014460d511534da8a955bee6948716ee (diff)
Use the official, documented NixOS runTest interface
Diffstat (limited to 'tests/nixos/remote-builds.nix')
-rw-r--r--tests/nixos/remote-builds.nix14
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/nixos/remote-builds.nix b/tests/nixos/remote-builds.nix
index 9f88217fe..696cd2652 100644
--- a/tests/nixos/remote-builds.nix
+++ b/tests/nixos/remote-builds.nix
@@ -1,15 +1,9 @@
# Test Nix's remote build feature.
-{ nixpkgs, system, overlay }:
-
-with import (nixpkgs + "/nixos/lib/testing-python.nix") {
- inherit system;
- extraConfigurations = [ { nixpkgs.overlays = [ overlay ]; } ];
-};
-
-makeTest (
+{ config, lib, hostPkgs, ... }:
let
+ pkgs = config.nodes.client.nixpkgs.pkgs;
# The configuration of the remote builders.
builder =
@@ -75,7 +69,7 @@ in
# Create an SSH key on the client.
subprocess.run([
- "${pkgs.openssh}/bin/ssh-keygen", "-t", "ed25519", "-f", "key", "-N", ""
+ "${hostPkgs.openssh}/bin/ssh-keygen", "-t", "ed25519", "-f", "key", "-N", ""
], capture_output=True, check=True)
client.succeed("mkdir -p -m 700 /root/.ssh")
client.copy_from_host("key", "/root/.ssh/id_ed25519")
@@ -109,4 +103,4 @@ in
builder1.block()
client.succeed("nix-build ${expr nodes.client.config 4}")
'';
-})
+}