From 32b3f7f2d255beae5d1cbefa195a1427592136c5 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 14 Jan 2018 22:06:32 +0100 Subject: [PATCH] ssh: allow disabling compression in host block Fixes #181. --- modules/programs/ssh.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/programs/ssh.nix b/modules/programs/ssh.nix index 9bce3009..4c68ebf8 100644 --- a/modules/programs/ssh.nix +++ b/modules/programs/ssh.nix @@ -82,9 +82,12 @@ let }; compression = mkOption { - type = types.bool; - default = false; - description = "Specifies whether to use compression."; + type = types.nullOr types.bool; + default = null; + description = '' + Specifies whether to use compression. Omitted from the host + block when null. + ''; }; checkHostIP = mkOption { @@ -123,7 +126,7 @@ let ++ optional (cf.hostname != null) " HostName ${cf.hostname}" ++ optional (cf.serverAliveInterval != 0) " ServerAliveInterval ${toString cf.serverAliveInterval}" - ++ optional cf.compression " Compression yes" + ++ optional (cf.compression != null) " Compression ${yn cf.compression}" ++ optional (!cf.checkHostIP) " CheckHostIP no" ++ optional (cf.proxyCommand != null) " ProxyCommand ${cf.proxyCommand}" ++ mapAttrsToList (n: v: " ${n} ${v}") cf.extraOptions