all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How do I extend openssh-service-type ?
@ 2022-05-10 21:07 Edouard Klein
  2022-05-11  7:37 ` bug#55359: " Oleg Pykhalov
  0 siblings, 1 reply; 6+ messages in thread
From: Edouard Klein @ 2022-05-10 21:07 UTC (permalink / raw)
  To: help-guix

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-05-31 17:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 21:07 How do I extend openssh-service-type ? Edouard Klein
2022-05-11  7:37 ` bug#55359: " 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

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.