guix-devel
[Top][All Lists]
Advanced

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

Re: service extensions to guix-service-type


From: Kaelyn
Subject: Re: service extensions to guix-service-type
Date: Mon, 11 Apr 2022 19:32:39 +0000

------- Original Message -------
On Sunday, April 10th, 2022 at 8:19 PM, Justin Veilleux <terramorpha@cock.li> 
wrote:


> Hi guix-devel.
>
> For my os.scm, I want to create a service which encapsulates the process
> of adding channels to the global channels file, adding substitute urls
> to the daemon and also adding authorized keys to the daemon. With the
> service extension system, I was able to do the first thing by extending
> `special-files-service-type`. However, I cannot do the last two things,
> because the current definition of guix-service-type only exposes
> chroot-directories (what is the use case for this, btw?).
>
> Is there a reason for this particular design? I will probably submit a
> patch to add this functionality.
>
> Cheers.

Hi Justin,

You should be able to add authorized keys and substitute URLs by modifying the 
guix-service-type's config in your OS's list of services. For example:

(modify-services
 %desktop-services
 (guix-service-type config =>
                    (guix-configuration
                     (inherit config)
                     (substitute-urls
                      (cons* "http://myserver:8880";
                             (guix-configuration-substitute-urls config)))
                     (authorized-keys
                      (cons* (gexp:local-file "myserver-signing-key.pub")
                             (guix-configuration-authorized-keys config))))))

(More info on the guix-configuration fields can be found at 
https://guix.gnu.org/en/manual/devel/en/html_node/Base-Services.html#Base-Services
 :)

Hope that helps!

Cheers,
Kaelyn



reply via email to

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