nixos/iperf3: add package option

This commit is contained in:
Luflosi 2024-08-08 11:15:26 +02:00
parent 9badce6a75
commit d80d811a6f
No known key found for this signature in database
GPG Key ID: 743C5DD6900A1FF0
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ let
api = {
enable = mkEnableOption "iperf3 network throughput testing server";
package = mkPackageOption pkgs "iperf3" { };
port = mkOption {
type = types.ints.u16;
default = 5201;
@ -76,7 +77,7 @@ let
CapabilityBoundingSet = "";
NoNewPrivileges = true;
ExecStart = ''
${pkgs.iperf3}/bin/iperf \
${lib.getExe cfg.package} \
--server \
--port ${toString cfg.port} \
${optionalString (cfg.affinity != null) "--affinity ${toString cfg.affinity}"} \

View File

@ -42,6 +42,7 @@ stdenv.mkDerivation rec {
description = "Tool to measure IP bandwidth using UDP or TCP";
platforms = lib.platforms.unix;
license = lib.licenses.bsd3;
mainProgram = "iperf3";
maintainers = with lib.maintainers; [ fpletz ];
};
}