Skip to content

Commit

Permalink
nixOSTest: core interactive config
Browse files Browse the repository at this point in the history
  • Loading branch information
sarcasticadmin committed Sep 3, 2024
1 parent f2b8a79 commit 129d197
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions nix/tests/core.nix
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,27 @@ in
client1.wait_until_succeeds("test ! -z \"$(drill -Q -z coreexpo.scale.lan AAAA)\"")
client1.wait_until_succeeds("test ! -z \"$(drill -Q -z -x ${coremasterAddr.ipv4})\"")
'';

interactive.nodes =
let
interactiveDefaults = hostPort:
{
services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "yes";
users.extraUsers.root.initialPassword = "";
systemd.network.networks."01-eth0" = {
name = "eth0";
enable = true;
networkConfig.DHCP = "yes";
};
virtualisation.forwardPorts = [
{ from = "host"; host.port = hostPort; guest.port = 22; }
];
};
in
{
router = interactiveDefaults 2222;
coremaster = interactiveDefaults 2223;
client1 = interactiveDefaults 2224;
};
}

0 comments on commit 129d197

Please sign in to comment.