guix-devel
[Top][All Lists]
Advanced

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

Re: Return back original implementation for text-config serialization


From: Andrew Tropin
Subject: Re: Return back original implementation for text-config serialization
Date: Fri, 28 Jan 2022 18:48:58 +0300

On 2022-01-27 00:04, Maxim Cournoyer wrote:

> Hi Andrew,
>
> Andrew Tropin <andrew@trop.in> writes:
>
> [...]
>
>> Ludovic mentioned someday that nginx-configuration is problematic, but I
>> highlighted the generic problems, which are applicable for many other
>> guix service configurations.
>>
>> I discussed some other pros and cons of record-based configurations in
>> https://issues.guix.gnu.org/52698
>>
>> and I see the benifits of the records, but I'm not sure if they
>> outweight the weaknesses.
>>
>> It maybe sound unrelated to this thread, but it's actually very ontopic,
>> because it lead to the design and implementation of home services
>> configuration approach in general and slurp-file-gexp and text-config in
>> particular.
>
> Pardon my ignorance about Guix Home, but couldn't we have configuration
> as records by default, and the lower level, config stitching primitives
> still available to hand craft strings that could be used as the value of
> an 'extra-config' field, for example?

extra-config/extra-content/file doesn't play well with the rest of
configuration record.

See the proposed patch, which introduces home service for redshift:
https://issues.guix.gnu.org/53466

I briefly mentioned it, but can elaborate if necessary.

To be clear the top-level SOMETHING-configuration still being the
record, fields, which introduces some complex changes like
shepherd-service? or something-else-quite-big still fields of this
record, but what get serialized to config file will be mostly a plain
datastructure in the approach I propose and recommend.

> It seems to me the use of records for configurations in Guix Home would
> be the natural choice, as Guix System users are already familiar with
> them and it leans to better discoverability/documentation.

The point about Guix System users is valid, however I don't see it as a
big paradigm shift or very different approach.

I made a few points about discoverability/documentation in issue about
redshift.

-- 
Best regards,
Andrew Tropin

Attachment: signature.asc
Description: PGP signature


reply via email to

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