Re: Extending the mysql configuration

2017-04-21 Thread Ludovic Courtès
Andy Wingo  skribis:

> On Wed 19 Apr 2017 19:45, Christopher Baines  writes:
>
>> I also spotted the define-configuration syntax, which looks like it
>> might work well, but I wanted to check if this was definitely a
>> direction more services were heading before attempting to write out a
>> large part of the supported configuration options.
>
> MHO is this is the direction we should go in.  Having a configuration
> defined in a data type that Guix can understand makes it easier to
> operate on the system as a whole -- the system can see your mysql
> configuration and introspect on it, it's easy to define extension
> points, etc.  There are a few services that use this approach and I
> expect the number to grow over time.  At the same time many of these
> services have the option to fall back on an opaque configuration when
> you have special needs or a different workflow -- see dovecot for a very
> long example.

I agree.

Record types defined with ‘define-configuration’ or similar are
preferable to using an alist or another dictionary type also because of
the set of fields is checked at macro-expansion time (eventually I’d
like to have some static type checks in there too).

Ludo’.



Re: Extending the mysql configuration

2017-04-20 Thread Andy Wingo
On Wed 19 Apr 2017 19:45, Christopher Baines  writes:

> I also spotted the define-configuration syntax, which looks like it
> might work well, but I wanted to check if this was definitely a
> direction more services were heading before attempting to write out a
> large part of the supported configuration options.

MHO is this is the direction we should go in.  Having a configuration
defined in a data type that Guix can understand makes it easier to
operate on the system as a whole -- the system can see your mysql
configuration and introspect on it, it's easy to define extension
points, etc.  There are a few services that use this approach and I
expect the number to grow over time.  At the same time many of these
services have the option to fall back on an opaque configuration when
you have special needs or a different workflow -- see dovecot for a very
long example.

Andy



Extending the mysql configuration

2017-04-19 Thread Christopher Baines
Hey,

Does anyone have any advice about making the mysql service configuration
more flexible? At the moment, its not even possible to use a custom
configuration file without modifying the Guix source code.

My initial thoughts revolved around at some level providing access to a
data structure like:

(("mysqld" . (("datadir" . "/var/lib/mysql")
  ("socket" . "/var/run/mysql/mysql.sock")
  ("port" . "3306"

This could be part of a record, that can be built in to the
configuration file. This could also be a general feature, as I'm sure
other services will use this format, I spotted Avahi when looking
through the code.

I also spotted the define-configuration syntax, which looks like it
might work well, but I wanted to check if this was definitely a
direction more services were heading before attempting to write out a
large part of the supported configuration options.

Thanks,

Chris



signature.asc
Description: OpenPGP digital signature