1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

tests/nixos: Test remote build against older versions

This commit is contained in:
Robert Hensing 2024-01-22 18:34:52 +01:00
parent da1aae2d06
commit e502d1cf94
3 changed files with 136 additions and 6 deletions

View file

@ -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;