all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: "Thompson, David" <dthompson2@worcester.edu>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Composing service definitions (and maybe fmt)
Date: Thu, 21 Jan 2016 22:27:45 +0100	[thread overview]
Message-ID: <87zivyvd0u.fsf@gnu.org> (raw)
In-Reply-To: <CAJ=RwfadJNTxm9XFZo70FW6=v+GEcpe+0Jzd3ArYBa1tkafLbQ@mail.gmail.com> (David Thompson's message of "Thu, 21 Jan 2016 09:12:49 -0500")

"Thompson, David" <dthompson2@worcester.edu> skribis:

> On Wed, Jan 20, 2016 at 5:13 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> To me, the question is more about choosing between writing configuration
>> file bindings and exposing upstream’s configuration file syntax, as was
>> discussed when Andy posted the Dovecot service.  (To which I don’t have
>> a better answer than: let’s see on a case-by-case basis.)
>
> How about this:
>
> Procedures that return services should accept file-like objects when
> configuration files are needed.  When it makes sense (like with
> elogind, dovecot, etc.), we can provide special procedures that take a
> Scheme data structure and "compile" that to a file-like object in the
> service's native configuration language.  This way, we allow ourselves
> to have the high-level Scheme configuration APIs we like while also
> allowing the use of "raw" configuration files in situations where it
> is unavoidable or the path of least resistance.

I like it!  When we provide Scheme data structures, we necessarily have
a ‘foo-configuration->file’ procedure anyway, so it’s just a matter of
exposing it.

Ludo’.

  reply	other threads:[~2016-01-21 21:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-16 23:03 Composing service definitions (and maybe fmt) Christopher Allan Webber
2016-01-19 13:14 ` Ricardo Wurmus
2016-01-19 15:58   ` Christopher Allan Webber
2016-01-20  9:37     ` Ricardo Wurmus
2016-01-20 17:49       ` Christopher Allan Webber
2016-01-20 22:13         ` Ludovic Courtès
2016-01-21 14:12           ` Thompson, David
2016-01-21 21:27             ` Ludovic Courtès [this message]
2016-01-21 21:57               ` Christopher Allan Webber
2016-01-24 20:35                 ` Ludovic Courtès
2016-01-24 22:18                   ` Christopher Allan Webber

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=87zivyvd0u.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    /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.