Subject: bug#26684: let nginx configs reference the store

From: [email-masked] (Ludovic Courtès)
Date: Wed, 03 May 2017 14:43:10 +0200

Andy Wingo <[email-masked]> skribis:

> Is this the right way to do things?  Passing lists around seems to be an
> intermediate point between strings and proper configuration values -- as
> such it seems like a useful intermediate step.  The context is that I
> need to be able to extend the nginx configuration with a server config
> that references a store path.

I don’t know if it’s ideal but it’s definitely an improvement!

What I had in mind when I thought about fixing the very same issue was
to generate a gexp as the IR of the configuration file, something like:

  #~(nginx
      (server bar
        (location #$foo)))

and then have a build-side ‘sexp->nginx-config-file’ procedure that
would convert it.

That’s nicer in theory but probably more tricky than what you propose
here.

In the short term I think applying the patch you posted is probably the
right thing.

Thoughts?

Thanks,
Ludo’.