From ca6d216ef4630c0402c60cee5c22323539ec0d05 Mon Sep 17 00:00:00 2001 From: Matthias Tafelmeier Date: Tue, 28 Nov 2023 13:44:19 +0100 Subject: [PATCH] define test run systemd service units --- testing/infra/machines/nix/configuration.nix | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/testing/infra/machines/nix/configuration.nix b/testing/infra/machines/nix/configuration.nix index adf9d912..f8664e49 100644 --- a/testing/infra/machines/nix/configuration.nix +++ b/testing/infra/machines/nix/configuration.nix @@ -39,6 +39,28 @@ }; }; + systemd.services.test-client = { + enable = true; + wantedBy = [ ]; + after = [ ]; + description = "Start test-client"; + serviceConfig = { + Type = "exec"; + ExecStart = "source /home/godon_robot/sink_ip; /run/current-system/sw/bin/iperf3 -P 5 -t 36000 -c $SINK_IP"; + }; + }; + + systemd.services.test-server = { + enable = true; + wantedBy = [ ]; + after = [ ]; + description = "Start test-server"; + serviceConfig = { + Type = "exec"; + ExecStart = "/run/current-system/sw/bin/iperf3 -s"; + }; + }; + environment.systemPackages = with pkgs; [ python3 bashInteractive_5