From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Vollmert Subject: Re: extending a service to create an extra directory Date: Sat, 20 Jul 2019 09:57:31 +0200 Message-ID: References: <32B3BD3C-15A9-4428-904E-E4E341A7A55C@vllmrt.net> Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43696) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hokFS-0004bx-O4 for help-guix@gnu.org; Sat, 20 Jul 2019 03:57:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hokFR-000204-HV for help-guix@gnu.org; Sat, 20 Jul 2019 03:57:42 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:46670) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hokFR-0001zf-C0 for help-guix@gnu.org; Sat, 20 Jul 2019 03:57:41 -0400 In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Reza Alizadeh Majd Cc: help-guix@gnu.org On 20. Jul 2019, at 08:18, Reza Alizadeh Majd = wrote: > On Thu, Jul 18, 2019, at 6:30 PM, Robert Vollmert wrote: >>=20 >> I=E2=80=99m trying to set up nginx properly, and my config involves a >> cache directory, say /var/nginx/cache. To encode this properly, >> I=E2=80=99d like to to make my nginx service create that directory >> with appropriate user and rights on service activation. I can=E2=80=99t= >> 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? >=20 > 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:=20 >=20 > = 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 =E2=80=94 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=E2=80=99t =E2=80=9Cpar= t=E2=80=9D of the nginx services activation. I could see nginx activation fail if the cache = directory service didn=E2=80=99t happen to run first. Might this be solved be by = adding a shepherd =E2=80=9Crequirement=E2=80=9D? Cheers Robert