Andrew Tropin schreef op wo 26-01-2022 om 11:36 [+0300]: > In addition to the problems I mentioned above: > > 1. Mixed usage of two configuration languages (nginx-conf and lisp). > 2. Having a string, which should be properly escaped (luckily for > this > example it's not a problem). Mixing two configuration languages can be avoided by supporting everything with records. > > we also: > > 3. Have to implement our own templating engine (using format function > in this case) to share the values from guile with the config. This seems to be the same for this list based configuration system and record based configuraiton system; for the nginx example you gave, all these lists with parentheses need to turned into something with brackets that nginx understands anyway. > 4.1. Don't know where extra-content goes. (It goes to http section > not the > end of the file, so we have to start with "}" to get a correct > configuration). Can be solved by adding missing options to the Guix service definition (and documentation) when the need arises. > 4.2. Don't control where it must be placed. (Can be important in > other > use cases, which I can share if needed). Likewise. > 5. Have inconsistent implementation of extra-config, extra-content, > raw-lines > and other escape hatches (We need to learn it everytime we write a > new > service configuration). Likewise. Also, the mapping of upstream configuration files to lists in Guix seems far from obvious to me: in https://issues.guix.gnu.org/52698, how am I supposed to know that 'us,ru' must be a symbol, why isn't it a string? If one of the strings for some property includes a special character from the configuration language (say, '$'), should it be escaped in Guix ((bindsym ... "[class=\"$100 dollars\"]" ...) or (bindsym ... "[class=\"\\$100 dollars\""]""))? Why (bindsym ... "[class=\"foo\"]") instead of (bindsym ... (= class "foo"))? Why (bindsym ... exec emacsclient ...) and not (bindsym ... exec (file-append emacs "/bin/emacsclient) ...)? How am I supposed to know whether emacs is in the path or not, and if it is, is this merely an implementation detail? How would I know if it's (bindsym ... exec emacsclient -c --eval "'(eshell)'") or (bindsym ... "exec emacsclient -c --eval \"'(eshell)'\"")? Since the idea is to keep as close to the configuration language as possible, shouldn't it be the second? Why lists and not vectors? Greetings, Maxime.