Hi Guix, (Cc'd the Home Team)
Lately, Andrew's proposal[1] on using free-style configurations for services came to my mind again. Ludovic was againt it for potential generation of invalid config files and obscure error messages. But how about treating it as an escape hatch like ‘extra-config’? I'm aware of two inflexiblities in our service configurations: 1. Too many configuration fields. e.g. bluetooth-configuration I don't think all the fields have at least one user. :) I remember the experience of trying to find ‘auto-enable?’ from the documentation. Keeping track of upstream updates would be a pain, and it requires knowledge to write readable documentation for some fields. If it's a port of the original configuration, why not supply an INI file directly? (extra-config) If the point is to use Scheme, why not use an alist and serialize it to INI? (RDE, free-style configurations) 2. Need of manually exposing interfaces. e.g. those from shepherd-service. I have the following approach in mind that may solve these inflexiblities: 1. Configuration interface consists of regular fields + free-style config + extra-config. This helps reduce configuration fields to those we know and use. We can also maintain a better documentation. 2. Merge regular fields and free-style config into an alist, service extensions will make use of this alist and extra-config. With this we can utilize existing serializers from Guile packages directly. --8<---------------cut here---------------start------------->8--- '((shepherd . ((requirement . <...>))) (config . <...>)) --8<---------------cut here---------------end--------------->8--- free-style config uses the same format as this alist. It would be better if we can deserialize extra-config and merge it into the alist as well. This is an initial thought and I don't have an implementation at the moment, I'll try to make some example services and see how it goes. Thanks --- 1: [bug#65119] [PATCH 0/8] Sharing service code between Home and System https://yhetil.org/guix-patches/874jk3sk57....@trop.in/