Hartmut Goebel <h.goe...@crazy-compilers.com> skribis: > Hi, >> If the vhost’s root directory is immutable, you can of course add it to >> the store via ‘computed-file’ or similar, and then write: >> >> (nginx-vhost-configuration >> (root #$(computed-file "root" …)))
Oops, there shouldn’t be a #$ here since we’re not inside #~. > Related question: I've but the content of some example website into a > package. How can I use that package's directory as "root"? I tried > these, but none worked: > > (root (package-file demo-website)) > (root #$(file-append demo-website "/")) > (root (assoc-ref demo-website "out")) > (root #$demo-website) Assuming ‘demo-website’ is bound to a package object, you should be able to do: (root (file-append demo-website "/")) or simply: (root demo-website) The #$ above are invalid since #$ is meant to be used within #~. Likewise, the first argument to ‘assoc-ref’ must be an association list, which ‘demo-website’ is not. As for ‘package-file’, it’s not enough: it returns the file name of the package, but doesn’t make the package a dependency of the vhost config. HTH! Ludo’.