bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55359: How do I extend openssh-service-type ?


From: Oleg Pykhalov
Subject: bug#55359: How do I extend openssh-service-type ?
Date: Thu, 26 May 2022 08:40:07 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi,

Ludovic Courtès <ludo@gnu.org> writes:

> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>
>> Seems like extend-openssh-authorized-keys procedure does not use keys
>> argument. We could fix it like:
>>
>> 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
>
> Indeed.  Please push!

Pushed as 1f29ed4a812f86c45e2d9c37fd9f80f6d0418293.

> 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

Edouard, you should be able to extend the service after the ‘guix pull’.

Oleg.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]