On 2022-01-27 00:04, Maxim Cournoyer wrote: > Hi Andrew, > > Andrew Tropin 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