unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: Edouard Klein <edk@beaver-labs.com>
Cc: 55359@debbugs.gnu.org, help-guix@gnu.org
Subject: bug#55359: How do I extend openssh-service-type ?
Date: Wed, 11 May 2022 10:37:04 +0300	[thread overview]
Message-ID: <87r150o6zj.fsf@gmail.com> (raw)
In-Reply-To: <87tu9xum2c.fsf@rdklein.fr> (Edouard Klein's message of "Tue, 10 May 2022 23:07:10 +0200")

[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]

Hi,

Edouard Klein <edk@beaver-labs.com> writes:

> I'm trying to make sense of:
> https://guix.gnu.org/manual/en/guix.html#index-openssh_002dservice_002dtype
>
> #+begin_quote
> This service can be extended with extra authorized keys, as in this example:
>
> (service-extension openssh-service-type
>                    (const `(("charlie"
>                              ,(local-file "charlie.pub")))))
> #+end_quote

[…]

Seems like extend-openssh-authorized-keys procedure does not use keys
argument. We could fix it like:
--8<---------------cut here---------------start------------->8---
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index 7fbbe383e5..4bb3969b95 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -558,7 +558,7 @@ (define (extend-openssh-authorized-keys config keys)
   (openssh-configuration
    (inherit config)
    (authorized-keys
-    (match (openssh-configuration-authorized-keys config)
+    (match (append (openssh-configuration-authorized-keys config) keys)
       (((users _ ...) ...)
        ;; Build a user/key-list mapping.
        (let ((user-keys (alist->vhash
--8<---------------cut here---------------end--------------->8---


Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

  reply	other threads:[~2022-05-11  7:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 21:07 How do I extend openssh-service-type ? Edouard Klein
2022-05-11  7:37 ` Oleg Pykhalov [this message]
2022-05-25 12:06   ` bug#55359: " Ludovic Courtès
2022-05-26 14:44   ` Ludovic Courtès
2022-05-31 17:05     ` Edouard Klein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r150o6zj.fsf@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=55359@debbugs.gnu.org \
    --cc=edk@beaver-labs.com \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).