From 57d74e6f4fa13cf1402536efa39250ea9e99a883 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 13 Jul 2012 17:59:03 -0400 Subject: [PATCH] openssh.authorizedKeys.keyFiles: allow multiple keys Ugly hack to get around the error "a string that refers to a store path cannot be appended to a path". The underlying problem is that you cannot do "${./file1} ${./file2}" but you can do " ${./file1} ${./file2}" Obviously we should allow the first case as well. --- modules/services/networking/ssh/sshd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/services/networking/ssh/sshd.nix b/modules/services/networking/ssh/sshd.nix index 7f1cc24793ec..6791a6b3ea81 100644 --- a/modules/services/networking/ssh/sshd.nix +++ b/modules/services/networking/ssh/sshd.nix @@ -90,7 +90,7 @@ let userLoop = flip concatMapStrings usersWithKeys (u: let authKeys = concatStringsSep "," u.openssh.authorizedKeys.keys; - authKeyFiles = concatStringsSep " " u.openssh.authorizedKeys.keyFiles; + authKeyFiles = concatStrings (map (x: " ${x}") u.openssh.authorizedKeys.keyFiles); preserveExisting = if u.openssh.authorizedKeys.preserveExistingKeys then "true" else "false"; in '' mkAuthKeysFile "${u.name}" "${authKeys}" "${authKeyFiles}" "${preserveExisting}"