all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* extending a service to create an extra directory
@ 2019-07-18 13:47 Robert Vollmert
  2019-07-20  6:18 ` Reza Alizadeh Majd
  0 siblings, 1 reply; 3+ messages in thread
From: Robert Vollmert @ 2019-07-18 13:47 UTC (permalink / raw)
  To: help-guix

Hi,

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?

Cheers
Robert

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: extending a service to create an extra directory
  2019-07-18 13:47 extending a service to create an extra directory Robert Vollmert
@ 2019-07-20  6:18 ` Reza Alizadeh Majd
  2019-07-20  7:57   ` Robert Vollmert
  0 siblings, 1 reply; 3+ messages in thread
From: Reza Alizadeh Majd @ 2019-07-20  6:18 UTC (permalink / raw)
  To: Robert Vollmert; +Cc: help-guix

Hi, 

On Thu, Jul 18, 2019, at 6:30 PM, Robert Vollmert wrote:
> Hi,
> 
> 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?
> 
> Cheers
> Robert
> 

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

Best, 
Reza

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: extending a service to create an extra directory
  2019-07-20  6:18 ` Reza Alizadeh Majd
@ 2019-07-20  7:57   ` Robert Vollmert
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Vollmert @ 2019-07-20  7:57 UTC (permalink / raw)
  To: Reza Alizadeh Majd; +Cc: help-guix

On 20. Jul 2019, at 08:18, Reza Alizadeh Majd <r.majd@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-20  7:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-18 13:47 extending a service to create an extra directory Robert Vollmert
2019-07-20  6:18 ` Reza Alizadeh Majd
2019-07-20  7:57   ` Robert Vollmert

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.