unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* service extensions to guix-service-type
@ 2022-04-11  3:19 Justin Veilleux
  2022-04-11 19:32 ` Kaelyn
  2022-04-18 19:48 ` Ludovic Courtès
  0 siblings, 2 replies; 3+ messages in thread
From: Justin Veilleux @ 2022-04-11  3:19 UTC (permalink / raw)
  To: guix-devel

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.



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

* Re: service extensions to guix-service-type
  2022-04-11  3:19 service extensions to guix-service-type Justin Veilleux
@ 2022-04-11 19:32 ` Kaelyn
  2022-04-18 19:48 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Kaelyn @ 2022-04-11 19:32 UTC (permalink / raw)
  To: Justin Veilleux; +Cc: guix-devel

------- 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


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

* Re: service extensions to guix-service-type
  2022-04-11  3:19 service extensions to guix-service-type Justin Veilleux
  2022-04-11 19:32 ` Kaelyn
@ 2022-04-18 19:48 ` Ludovic Courtès
  1 sibling, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2022-04-18 19:48 UTC (permalink / raw)
  To: Justin Veilleux; +Cc: guix-devel, Brice Waegeneire

Hi Justin,

Justin Veilleux <terramorpha@cock.li> skribis:

> 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?).

It used to be that qemu-binfmt support for Guix relied on extending
‘guix-service-type’ with extra “chroot directories”; this was changed in
commit 77c2f4e2068ebec3f384c826c5a99785125ff72c, so this extension
mechanism is no longer used.

Perhaps we could now use the extension point for the purposes you
suggest?

Alternatively (or in addition to that), Brice (Cc’d) proposed adding a
‘channels’ field to <guix-configuration>:

  https://issues.guix.gnu.org/49610

Thanks,
Ludo’.


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

end of thread, other threads:[~2022-04-18 19:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11  3:19 service extensions to guix-service-type Justin Veilleux
2022-04-11 19:32 ` Kaelyn
2022-04-18 19:48 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).