diff options
author | Matthieu Coudron <mattator@gmail.com> | 2019-07-04 14:32:30 +0900 |
---|---|---|
committer | Matthieu Coudron <coudron@iij.ad.jp> | 2019-07-04 16:58:56 +0200 |
commit | 2ebeba49276b4a0e7764ad65f33a0572ff4f1963 (patch) | |
tree | 720fc52e5736745474d4a053a8bdbdda1ff91aa5 /nixos/modules/services/networking/iperf3.nix | |
parent | e6b6815b26f3fee47ddd1b237b70cec10f30e588 (diff) | |
download | nixpkgs-2ebeba49276b4a0e7764ad65f33a0572ff4f1963.tar nixpkgs-2ebeba49276b4a0e7764ad65f33a0572ff4f1963.tar.gz nixpkgs-2ebeba49276b4a0e7764ad65f33a0572ff4f1963.tar.bz2 nixpkgs-2ebeba49276b4a0e7764ad65f33a0572ff4f1963.tar.lz nixpkgs-2ebeba49276b4a0e7764ad65f33a0572ff4f1963.tar.xz nixpkgs-2ebeba49276b4a0e7764ad65f33a0572ff4f1963.tar.zst nixpkgs-2ebeba49276b4a0e7764ad65f33a0572ff4f1963.zip |
nixos/iperf: add openFirewall setting
Opens the specified tcp port.
Diffstat (limited to 'nixos/modules/services/networking/iperf3.nix')
-rw-r--r-- | nixos/modules/services/networking/iperf3.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/iperf3.nix b/nixos/modules/services/networking/iperf3.nix index 742404a5692..0fe378b225d 100644 --- a/nixos/modules/services/networking/iperf3.nix +++ b/nixos/modules/services/networking/iperf3.nix @@ -19,6 +19,11 @@ let default = null; description = "Bind to the specific interface associated with the given address."; }; + openFirewall = mkOption { + type = types.bool; + default = false; + description = "Open ports in the firewall for iperf3."; + }; verbose = mkOption { type = types.bool; default = false; @@ -52,6 +57,11 @@ let }; imp = { + + networking.firewall = mkIf cfg.openFirewall { + allowedTCPPorts = [ cfg.port ]; + }; + systemd.services.iperf3 = { description = "iperf3 daemon"; unitConfig.Documentation = "man:iperf3(1) https://iperf.fr/iperf-doc.php"; |