diff options
author | Daiderd Jordan <daiderd@gmail.com> | 2018-07-21 12:26:53 +0200 |
---|---|---|
committer | Daiderd Jordan <daiderd@gmail.com> | 2018-07-21 12:29:16 +0200 |
commit | 3572f89bbe154087d8ad83c36674d0c2499c0967 (patch) | |
tree | 4efbb1bd0c61561020ce3c2446c849eff6d4a884 /nixos | |
parent | 153d2241c1137f9bf035c6928a9e89f863779f20 (diff) | |
download | nixpkgs-3572f89bbe154087d8ad83c36674d0c2499c0967.tar nixpkgs-3572f89bbe154087d8ad83c36674d0c2499c0967.tar.gz nixpkgs-3572f89bbe154087d8ad83c36674d0c2499c0967.tar.bz2 nixpkgs-3572f89bbe154087d8ad83c36674d0c2499c0967.tar.lz nixpkgs-3572f89bbe154087d8ad83c36674d0c2499c0967.tar.xz nixpkgs-3572f89bbe154087d8ad83c36674d0c2499c0967.tar.zst nixpkgs-3572f89bbe154087d8ad83c36674d0c2499c0967.zip |
ssh: don't add empty PubkeyAcceptedKeyTypes/HostKeyAlgorithms
The options introduced in e2444a433fb would generate a broken ssh config when set to an empty list. /etc/ssh/ssh_config line 7: Missing argument.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/programs/ssh.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix index db44f9040dd..0f7f0515f0e 100644 --- a/nixos/modules/programs/ssh.nix +++ b/nixos/modules/programs/ssh.nix @@ -211,8 +211,8 @@ in ForwardX11 ${if cfg.forwardX11 then "yes" else "no"} - PubkeyAcceptedKeyTypes ${concatStringsSep "," cfg.pubkeyAcceptedKeyTypes} - HostKeyAlgorithms ${concatStringsSep "," cfg.hostKeyAlgorithms} + ${optionalString (cfg.pubkeyAcceptedKeyTypes != []) PubkeyAcceptedKeyTypes "${concatStringsSep "," cfg.pubkeyAcceptedKeyTypes}"} + ${optionalString (cfg.hostKeyAlgorithms != []) HostKeyAlgorithms "${concatStringsSep "," cfg.hostKeyAlgorithms}"} ${cfg.extraConfig} ''; |