From: Edouard Klein <edk@beaver-labs.com>
To: help-guix@gnu.org
Subject: How do I extend openssh-service-type ?
Date: Tue, 10 May 2022 23:07:10 +0200 [thread overview]
Message-ID: <87tu9xum2c.fsf@rdklein.fr> (raw)
Hi !
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
My goal is to do exactly that: add a public key to a user of an
operating system whose openssh-service-type is already configured
elsewhere.
I can do it by going to this "elsewhere" and adding the
("charlie" ,(local-file "charlie.pub"))
in the authorized-keys field of the openssh-configuration, but when I
try to extend the service, the key is just ignored and does not appear
in /etc/ssh/authorized-keys.d/
I've tried adding a simple-service to the operating-system declaration
like so:
#+begin_src scheme
(simple-service
(format #f "ssh keys for user ~a" "toto")
openssh-service-type
(list
`("toto" ,(local-file "toto.pub"))))
#+end_src
I also tried the verbose version:
#+begin_src scheme
(service (service-type
(name 'tamereenslip)
(extensions
(list
(service-extension openssh-service-type
(const `(("toto"
,(local-file "toto.pub")))))))) #f)
#+end_src
I'm at my wit's end. I could not find any examples online or by grepping
the source code.
Has anybody ever been successful in extending the openssh-service ? If
so, could I please see your code ?
Thanks,
Edouard.
next reply other threads:[~2022-05-10 21:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 21:07 Edouard Klein [this message]
2022-05-11 7:37 ` bug#55359: How do I extend openssh-service-type ? Oleg Pykhalov
2022-05-25 12:06 ` Ludovic Courtès
2022-05-26 5:40 ` Oleg Pykhalov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tu9xum2c.fsf@rdklein.fr \
--to=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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.