From 0312cb611ee0c230ba98fb7e08dae7a76aa62cee Mon Sep 17 00:00:00 2001 From: dsx Date: Mon, 3 Dec 2018 23:05:58 -0500 Subject: [PATCH] ssh: add addressFamily option (cherry picked from commit 6ce3ce69b98cc4f931d803fde2f52243746e0168) --- modules/programs/ssh.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/programs/ssh.nix b/modules/programs/ssh.nix index b0d07f51..874ae9af 100644 --- a/modules/programs/ssh.nix +++ b/modules/programs/ssh.nix @@ -133,6 +133,14 @@ let ''; }; + addressFamily = mkOption { + default = null; + type = types.nullOr (types.enum ["any" "inet" "inet6"]); + description = '' + Specifies which address family to use when connecting. + ''; + }; + extraOptions = mkOption { type = types.attrsOf types.str; default = {}; @@ -154,6 +162,7 @@ let ++ optional (cf.identityFile != null) " IdentityFile ${cf.identityFile}" ++ optional (cf.certificateFile != null) " CertificateFile ${cf.certificateFile}" ++ optional (cf.hostname != null) " HostName ${cf.hostname}" + ++ optional (cf.addressFamily != null) " AddressFamily ${cf.addressFamily}" ++ optional (cf.sendEnv != []) " SendEnv ${unwords cf.sendEnv}" ++ optional (cf.serverAliveInterval != 0) " ServerAliveInterval ${toString cf.serverAliveInterval}"