summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-01-19 14:40:04 +0100
committerLudovic Courtès <ludo@gnu.org>2017-01-19 14:44:59 +0100
commitdc72a7f7f7bddb9c7ed377a8e16179a7a8a37af5 (patch)
tree99e00e31a38355d9bdfd12fb6d0383fdee29bc96 /gnu
parent9c557a69aebe49bba12009a01cfaabf88ec3f665 (diff)
downloadguix-dc72a7f7f7bddb9c7ed377a8e16179a7a8a37af5.tar.gz
services: nginx: Add default values for <nginx-configuration> fields.
* gnu/services/web.scm (<nginx-configuration>)[nginx, log-directory]
[run-directory, server-blocks, upstream-blocks, file]: Add default
values.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/web.scm20
1 files changed, 13 insertions, 7 deletions
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index ec308976d7..11408d7b0e 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
-;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
@@ -94,12 +94,18 @@
 (define-record-type* <nginx-configuration>
   nginx-configuration make-nginx-configuration
   nginx-configuration?
-  (nginx         nginx-configuration-nginx)         ;<package>
-  (log-directory nginx-configuration-log-directory) ;string
-  (run-directory nginx-configuration-run-directory) ;string
-  (server-blocks nginx-configuration-server-blocks) ;list
-  (upstream-blocks nginx-configuration-upstream-blocks) ;list
-  (file          nginx-configuration-file))         ;string | file-like
+  (nginx         nginx-configuration-nginx          ;<package>
+                 (default nginx))
+  (log-directory nginx-configuration-log-directory  ;string
+                 (default "/var/log/nginx"))
+  (run-directory nginx-configuration-run-directory  ;string
+                 (default "/var/run/nginx"))
+  (server-blocks nginx-configuration-server-blocks
+                 (default '()))          ;list of <nginx-server-configuration>
+  (upstream-blocks nginx-configuration-upstream-blocks
+                   (default '()))      ;list of <nginx-upstream-configuration>
+  (file          nginx-configuration-file         ;#f | string | file-like
+                 (default #f)))
 
 (define (config-domain-strings names)
  "Return a string denoting the nginx config representation of NAMES, a list