aboutsummaryrefslogtreecommitdiff
path: root/tests/nixos/remote-builds.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nixos/remote-builds.nix')
-rw-r--r--tests/nixos/remote-builds.nix21
1 files changed, 18 insertions, 3 deletions
diff --git a/tests/nixos/remote-builds.nix b/tests/nixos/remote-builds.nix
index 1c96cc787..eae1ccd88 100644
--- a/tests/nixos/remote-builds.nix
+++ b/tests/nixos/remote-builds.nix
@@ -1,6 +1,6 @@
# Test Nix's remote build feature.
-{ config, lib, hostPkgs, ... }:
+test@{ config, lib, hostPkgs, ... }:
let
pkgs = config.nodes.client.nixpkgs.pkgs;
@@ -8,7 +8,9 @@ let
# The configuration of the remote builders.
builder =
{ config, pkgs, ... }:
- { services.openssh.enable = true;
+ {
+ imports = [ test.config.builders.config ];
+ services.openssh.enable = true;
virtualisation.writableStore = true;
nix.settings.sandbox = true;
@@ -35,7 +37,20 @@ let
in
{
- name = "remote-builds";
+ name = lib.mkDefault "remote-builds";
+
+ # TODO expand module shorthand syntax instead of use imports
+ imports = [{
+ options = {
+ builders.config = lib.mkOption {
+ type = lib.types.deferredModule;
+ description = ''
+ Configuration to add to the builder nodes.
+ '';
+ default = { };
+ };
+ };
+ }];
nodes =
{ builder1 = builder;