all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kaelyn <kaelyn.alexi@protonmail.com>
To: Justin Veilleux <terramorpha@cock.li>
Cc: guix-devel@gnu.org
Subject: Re: service extensions to guix-service-type
Date: Mon, 11 Apr 2022 19:32:39 +0000	[thread overview]
Message-ID: <EBdi7-oxjOzC7N1Lt9yk8jzMmTXDSc_PYmxvE6a52vcLHmDxUv91Eph6eApUIv3iWETtHEgKskMmDcz_nj4coZ6YhFqHiCkAxV5csHzkbJ8=@protonmail.com> (raw)
In-Reply-To: <346fbbef-02b7-55a3-1d4a-92efa768c163@cock.li>

------- 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	other threads:[~2022-04-11 19:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  3:19 service extensions to guix-service-type Justin Veilleux
2022-04-11 19:32 ` Kaelyn [this message]
2022-04-18 19:48 ` Ludovic Courtès

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='EBdi7-oxjOzC7N1Lt9yk8jzMmTXDSc_PYmxvE6a52vcLHmDxUv91Eph6eApUIv3iWETtHEgKskMmDcz_nj4coZ6YhFqHiCkAxV5csHzkbJ8=@protonmail.com' \
    --to=kaelyn.alexi@protonmail.com \
    --cc=guix-devel@gnu.org \
    --cc=terramorpha@cock.li \
    /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.