summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgenii Lepikhin <e.lepihin@postgrespro.ru>2023-08-07 16:04:08 +0300
committerEvgenii Lepikhin <e.lepihin@postgrespro.ru>2023-08-07 16:04:08 +0300
commitbb41ec2ba1e2acf9294e89988aa0d5da8b141246 (patch)
tree50d9998e514d3018a270fd375436baa1bbfc3474
parentfix: Pin golang version (diff)
downloadjohnlepikhin-guix-channel-bb41ec2ba1e2acf9294e89988aa0d5da8b141246.tar.gz
feat: Allow multiple identity files
-rw-r--r--johnlepikhin/home/ssh.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/johnlepikhin/home/ssh.scm b/johnlepikhin/home/ssh.scm
index bbc44c6..37c3f15 100644
--- a/johnlepikhin/home/ssh.scm
+++ b/johnlepikhin/home/ssh.scm
@@ -43,7 +43,7 @@
(pubkey-accepted-key-types home-ssh-host-configuration-pubkey-accepted-key-types (default #f))
(host-key-algorithms home-ssh-host-configuration-host-key-algorithms (default #f))
(comment home-ssh-host-configuration-comment (default #f))
- (identity-file home-ssh-host-configuration-identity-file (default #f))
+ (identity-file home-ssh-host-configuration-identity-file (default (list)))
(add-ssh-keys-to-agent home-ssh-host-configuration-add-ssh-keys-to-agent (default #f))
)
@@ -74,8 +74,10 @@
(format #f " PubkeyAcceptedKeyTypes ~a\n" (home-ssh-host-configuration-pubkey-accepted-key-types val)) "")
(if (home-ssh-host-configuration-host-key-algorithms val)
(format #f " HostKeyAlgorithms ~a\n" (home-ssh-host-configuration-host-key-algorithms val)) "")
- (if (home-ssh-host-configuration-identity-file val)
- (format #f " IdentityFile ~a\n" (home-ssh-host-configuration-identity-file val)) "")
+ (string-concatenate
+ (map
+ (lambda (file) (string-append " IdentityFile " file "\n"))
+ (home-ssh-host-configuration-identity-file val)))
(if (home-ssh-host-configuration-add-ssh-keys-to-agent val)
" AddKeysToAgent yes\n" "")
"\n"))