From ce2e58f5950eb512c5cb279a33dfccd09a0a1e67 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..c6509af6 100644 --- a/testing/infra/machines/nix/configuration.nix +++ b/testing/infra/machines/nix/configuration.nix @@ -39,6 +39,28 @@ }; }; + systemd.services.test-client = { + enable = false; + wantedBy = [ ]; + after = [ "network.target" ]; + description = "Start test-client"; + serviceConfig = { + Type = "exec"; + ExecStart = "source /opt/sink_ip; iperf3 -P 5 -t 36000 -c $SINK_IP;"; + }; + }; + + systemd.services.test-server = { + enable = false; + wantedBy = [ ]; + after = [ "network.target" ]; + description = "Start test-server"; + serviceConfig = { + Type = "exec"; + ExecStart = "iperf3 -s;"; + }; + }; + environment.systemPackages = with pkgs; [ python3 bashInteractive_5