On 20. Jul 2019, at 08:18, Reza Alizadeh Majd <r.m...@pantherx.org> wrote: > On Thu, Jul 18, 2019, at 6:30 PM, Robert Vollmert wrote: >> >> I’m trying to set up nginx properly, and my config involves a >> cache directory, say /var/nginx/cache. To encode this properly, >> I’d like to to make my nginx service create that directory >> with appropriate user and rights on service activation. I can’t >> figure out how to do that without assembling a whole new service >> out of the parts of the existing nginx-service. There must be a >> more reasonable way? > > It seems that proper way to do this is to define a new service for > activating cache directory. since it was defined previously on Guix > CI server: > > https://git.savannah.gnu.org/cgit/guix/maintenance.git/tree/hydra/modules/sysadmin/services.scm#n221
Thanks for the pointer. Even apart from my concrete issue here, reading a complete worked config is very helpful — would be great if the manual contained such (or a link to some examples). The particular example of using a simple-service of activation-service-type is also helpful; it will work for me for now. It bothers me a bit that this activation action isn’t “part” of the nginx services activation. I could see nginx activation fail if the cache directory service didn’t happen to run first. Might this be solved be by adding a shepherd “requirement”? Cheers Robert