diff --git a/hosts/hachune-nixos/default.nix b/hosts/hachune-nixos/default.nix index 51c1e0de..98bd8646 100644 --- a/hosts/hachune-nixos/default.nix +++ b/hosts/hachune-nixos/default.nix @@ -23,6 +23,7 @@ in nixos.server = { enable = true; + iperf3.enable = true; jellyfin.enable = true; networkd.enable = true; plex.enable = true; diff --git a/hosts/mirai-vps/default.nix b/hosts/mirai-vps/default.nix index 928a8acb..ef6f1549 100644 --- a/hosts/mirai-vps/default.nix +++ b/hosts/mirai-vps/default.nix @@ -25,6 +25,7 @@ nixos = { server = { enable = true; + iperf3.enable = true; jellyfin.enable = true; plex.enable = true; ssh.enable = true; diff --git a/nixos/server/default.nix b/nixos/server/default.nix index 904909fd..bceb5cc0 100644 --- a/nixos/server/default.nix +++ b/nixos/server/default.nix @@ -4,6 +4,7 @@ imports = [ ./duckdns-updater.nix + ./iperf3.nix ./jellyfin.nix ./networkd.nix ./plex.nix diff --git a/nixos/server/iperf3.nix b/nixos/server/iperf3.nix new file mode 100644 index 00000000..b5116beb --- /dev/null +++ b/nixos/server/iperf3.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: + +{ + options.nixos.server.iperf3.enable = lib.mkEnableOption "IPerf3 config"; + + config = lib.mkIf config.nixos.server.iperf3.enable { + services.iperf3 = { + enable = true; + openFirewall = true; + }; + }; +} diff --git a/nixos/server/ssh.nix b/nixos/server/ssh.nix index 1629eff9..c90b3c48 100644 --- a/nixos/server/ssh.nix +++ b/nixos/server/ssh.nix @@ -1,4 +1,5 @@ { config, lib, ... }: + let inherit (config.meta) username; in {