Re: [PATCH] improve nginx-service

2016-11-27 Thread Ludovic Courtès
Hi, and sorry for the delay! julien lepiller skribis: > Le 2016-11-22 23:20, Hartmut Goebel a écrit : >> Am 20.11.2016 um 13:49 schrieb Julien Lepiller: >>> What do you think? should I continue in that direction, or should I go >>> back to what I was doing before? >> >> Thanks for working on thi

is using eval good style in guile?(was: [PATCH] improve nginx-service)

2016-11-25 Thread Hartmut Goebel
Am 25.11.2016 um 11:53 schrieb Clément Lassieur: > I think you are looking for "eval". > > (define (list->define-configuration stem fields) > (eval `(define-configuration ,stem ,@fields) (current-module))) I'm curious: In other programming languages, using eval is regarded bad programming style.

Re: [PATCH] improve nginx-service

2016-11-25 Thread Clément Lassieur
> I've been rethinking it, and I would like to use define-configuration > (from cups and dovecot) because it looks really good. But I don't want > to define the same config option for each possible block it can appear > in, and that's why I used (option). So I'm looking for a way to > dynamical

Re: [PATCH] improve nginx-service

2016-11-23 Thread julien lepiller
Le 2016-11-22 23:20, Hartmut Goebel a écrit : Am 20.11.2016 um 13:49 schrieb Julien Lepiller: What do you think? should I continue in that direction, or should I go back to what I was doing before? Thanks for working on this. I will give it a try the next days. But I want to share two points g

Re: [PATCH] improve nginx-service

2016-11-22 Thread Hartmut Goebel
Am 20.11.2016 um 13:49 schrieb Julien Lepiller: > What do you think? should I continue in that direction, or should I go > back to what I was doing before? Thanks for working on this. I will give it a try the next days. But I want to share two points going around in my head: 1) I propose moving t

Re: [PATCH] improve nginx-service

2016-11-20 Thread Julien Lepiller
On Sun, 06 Nov 2016 18:19:03 +0100 l...@gnu.org (Ludovic Courtès) wrote: > Hi, > > Tobias Geerinckx-Rice skribis: > > > However, a web search for ‘vhost site:nginx.org’ returns the > > following as a first result[0]: > > > >Note: “VirtualHost” is an Apache term. NGINX does not have > > Virt

Re: [PATCH] improve nginx-service

2016-11-06 Thread Ludovic Courtès
Hartmut Goebel skribis: > BTW: I just started typing down a simple "location" record type, and > started to think if these record types are really the way to go for the > configuration. > > In nginx AFAIK you can define many options on the server level, on the > vhost level and per location. Addi

Re: [PATCH] improve nginx-service

2016-11-06 Thread Ludovic Courtès
Hi, Tobias Geerinckx-Rice skribis: > However, a web search for ‘vhost site:nginx.org’ returns the following > as a first result[0]: > >Note: “VirtualHost” is an Apache term. NGINX does not have Virtual >hosts, it has “Server Blocks” that use the server_name and listen >directives to

Re: [PATCH] improve nginx-service

2016-11-06 Thread Tobias Geerinckx-Rice
Hullo Julien, (Sorry for replying at a random point in the thread — it's the only part I have in this mailbox.) On 04/11/16 23:58, Hartmut Goebel wrote: > Am 04.11.2016 um 23:12 schrieb Julien Lepiller: >> I'd like to get these patches accepted first, but I'm already >> working on adding more co

Re: [PATCH] improve nginx-service

2016-11-06 Thread Julien Lepiller
On Fri, 4 Nov 2016 23:34:31 +0100 Hartmut Goebel wrote: > Am 04.11.2016 um 23:12 schrieb Julien Lepiller: > >> > gnu/services/web.scm:118:34: In procedure > >> > default-nginx-vhost-config: gnu/services/web.scm:118:34: In > >> > procedure struct_vtable: Wrong type argument in position 1 > >>

Re: [PATCH] improve nginx-service

2016-11-04 Thread Hartmut Goebel
Am 04.11.2016 um 23:12 schrieb Julien Lepiller: > I'd like to get these patches accepted first, but I'm already working > on adding more configuration lines. BTW: I just started typing down a simple "location" record type, and started to think if these record types are really the way to go for the

Re: [PATCH] improve nginx-service

2016-11-04 Thread Hartmut Goebel
Am 04.11.2016 um 23:12 schrieb Julien Lepiller: >> > gnu/services/web.scm:118:34: In procedure >> > default-nginx-vhost-config: gnu/services/web.scm:118:34: In procedure >> > struct_vtable: Wrong type argument in position 1 (expecting struct): >> > (nginx-vhost-configuration (root taler-lan

Re: [PATCH] improve nginx-service

2016-11-04 Thread Julien Lepiller
On Fri, 4 Nov 2016 22:28:07 +0100 Hartmut Goebel wrote: > Hi Julien > > thanks for these patches. I applied them to current master, but I did > not work out how to use the new features. I'd appreciate a more > complete example. > > 0001-Make-nginx-service-extensible.patch > > +@deffn {Scheme Va

Re: [PATCH] improve nginx-service

2016-11-04 Thread Hartmut Goebel
Hi Julien thanks for these patches. I applied them to current master, but I did not work out how to use the new features. I'd appreciate a more complete example. 0001-Make-nginx-service-extensible.patch > +@deffn {Scheme Variable} nginx-service-type +This is the type for the > nginx web server. +

Re: [PATCH] improve nginx-service

2016-11-04 Thread Julien Lepiller
On Fri, 04 Nov 2016 14:21:43 +0100 l...@gnu.org (Ludovic Courtès) wrote: > Hartmut Goebel skribis: > > > Am 03.11.2016 um 15:54 schrieb Ludovic Courtès: > >> Assuming ‘demo-website’ is bound to a package object, you should > >> be able to do: > >> > >> (root (file-append demo-website "/")) >

Re: [PATCH] improve nginx-service

2016-11-04 Thread Ludovic Courtès
Hartmut Goebel skribis: > Am 03.11.2016 um 15:54 schrieb Ludovic Courtès: >> 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) > > Hmm, this does not work for me: > > > ice-

Re: [PATCH] improve nginx-service

2016-11-03 Thread Hartmut Goebel
Am 03.11.2016 um 15:54 schrieb Ludovic Courtès: > 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) Hmm, this does not work for me: ice-9/boot-9.scm:702:27: In procedure map: ice-

Re: [PATCH] improve nginx-service

2016-11-03 Thread Ludovic Courtès
Hartmut Goebel 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 in

Re: [PATCH] improve nginx-service

2016-11-02 Thread Hartmut Goebel
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" …))) Related question: I've but the content of some example website into a package. How can

Re: [PATCH] improve nginx-service

2016-10-30 Thread Ludovic Courtès
Julien Lepiller skribis: > On Thu, 27 Oct 2016 14:41:18 +0200 > l...@gnu.org (Ludovic Courtès) wrote: > >> [...] >> >> What I had in mind was just to add ‘compose’ and ‘extend’ to >> ‘nginx-service-type’ (this is where we define how extensions are >> handled). There’s a bit of extra bookeeping t

Re: [PATCH] improve nginx-service

2016-10-27 Thread Julien Lepiller
On Thu, 27 Oct 2016 14:41:18 +0200 l...@gnu.org (Ludovic Courtès) wrote: > [...] > > What I had in mind was just to add ‘compose’ and ‘extend’ to > ‘nginx-service-type’ (this is where we define how extensions are > handled). There’s a bit of extra bookeeping to do, in particular > moving the list

Re: [PATCH] improve nginx-service

2016-10-27 Thread Ludovic Courtès
Hi! Julien Lepiller skribis: > On Mon, 24 Oct 2016 22:51:27 +0200 > l...@gnu.org (Ludovic Courtès) wrote: [...] >> >> I suppose we could make ‘nginx-service-type’ extensible (info >> >> "(guix) Service Types and Services") so that people can write >> >> services that define new vhosts? >> >

Re: [PATCH] improve nginx-service

2016-10-26 Thread Julien Lepiller
On Mon, 24 Oct 2016 22:51:27 +0200 l...@gnu.org (Ludovic Courtès) wrote: > Hi, > > Julien Lepiller skribis: > > > On Wed, 19 Oct 2016 23:04:14 +0200 > > l...@gnu.org (Ludovic Courtès) wrote: > > > >> Hi Julien, > >> > >> This looks like a great improvement to me! Sounds nicer than > >> fidd

Re: [PATCH] improve nginx-service

2016-10-24 Thread Ludovic Courtès
Hi, Julien Lepiller skribis: > On Wed, 19 Oct 2016 23:04:14 +0200 > l...@gnu.org (Ludovic Courtès) wrote: > >> Hi Julien, >> >> This looks like a great improvement to me! Sounds nicer than fiddling >> with config files. >> >> I suppose we could make ‘nginx-service-type’ extensible (info "(gui

Re: [PATCH] improve nginx-service

2016-10-20 Thread Julien Lepiller
On Wed, 19 Oct 2016 23:04:14 +0200 l...@gnu.org (Ludovic Courtès) wrote: > Hi Julien, > > This looks like a great improvement to me! Sounds nicer than fiddling > with config files. > > I suppose we could make ‘nginx-service-type’ extensible (info "(guix) > Service Types and Services") so that p

Re: [PATCH] improve nginx-service

2016-10-19 Thread Ludovic Courtès
Hi Julien, This looks like a great improvement to me! Sounds nicer than fiddling with config files. I suppose we could make ‘nginx-service-type’ extensible (info "(guix) Service Types and Services") so that people can write services that define new vhosts? Julien Lepiller skribis: > From 613d

[PATCH] improve nginx-service

2016-10-16 Thread Julien Lepiller
Hi, this patch fixes a problem with nginx configuration (ensuring some directories are available to nginx) and adds vhost support in its configuration. Also updates the doc accordingly.From 613d5db739d4010be2037fd2fcfc70baca4625aa Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Mon, 26 Sep 2