diff --git a/nixos/modules/services/networking/iperf3.nix b/nixos/modules/services/networking/iperf3.nix index 55a8fe4db595..2b1ee71f1421 100644 --- a/nixos/modules/services/networking/iperf3.nix +++ b/nixos/modules/services/networking/iperf3.nix @@ -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}"} \ diff --git a/pkgs/tools/networking/iperf/3.nix b/pkgs/tools/networking/iperf/3.nix index 27b4e6ca37b4..8952c4004fd3 100644 --- a/pkgs/tools/networking/iperf/3.nix +++ b/pkgs/tools/networking/iperf/3.nix @@ -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 ]; }; }