From 92a6247bc23a9242a59b4656e7ea635cb4640197 Mon Sep 17 00:00:00 2001 From: Istvan Ruzman Date: Sun, 26 May 2024 17:50:19 +0200 Subject: [PATCH] nixos/ssh: don't write addressfamily with default value in config --- nixos/modules/programs/ssh.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix index 0692dd46f7d0..f2ef248d7866 100644 --- a/nixos/modules/programs/ssh.nix +++ b/nixos/modules/programs/ssh.nix @@ -293,9 +293,9 @@ in # Generated options from other settings Host * - AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"} GlobalKnownHostsFile ${builtins.concatStringsSep " " knownHostsFiles} + ${lib.optionalString (!config.networking.enableIPv6) "AddressFamily inet"} ${lib.optionalString cfg.setXAuthLocation "XAuthLocation ${pkgs.xorg.xauth}/bin/xauth"} ${lib.optionalString (cfg.forwardX11 != null) "ForwardX11 ${if cfg.forwardX11 then "yes" else "no"}"}