[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
83/182: services: Make it possible to include dynamic modules in nginx.
From: |
guix-commits |
Subject: |
83/182: services: Make it possible to include dynamic modules in nginx. |
Date: |
Fri, 15 Nov 2019 00:01:42 -0500 (EST) |
kkebreau pushed a commit to branch wip-gnome-updates
in repository guix.
commit 548bea43f9454fa1797ec6f0691f8481c870286b
Author: Florian Pelz <address@hidden>
Date: Wed Nov 6 19:15:57 2019 +0100
services: Make it possible to include dynamic modules in nginx.
* gnu/services/web.scm (<nginx-configuration>): Add modules field.
(nginx-configuration-modules): New field accessor.
(emit-load-module): New procedure.
(default-nginx-config): Add support for the modules field.
* doc/guix.texi (NGINX): Document it.
---
doc/guix.texi | 11 +++++++++++
gnu/services/web.scm | 8 ++++++++
2 files changed, 19 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 3b8e593..4df928e 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -19765,6 +19765,17 @@ use the size of the processors cache line.
@item @code{server-names-hash-bucket-max-size} (default: @code{#f})
Maximum bucket size for the server names hash tables.
+@item @code{modules} (default: @code{'()})
+List of nginx dynamic modules to load. This should be a list of file
+names of loadable modules, as in this example:
+
+@lisp
+(modules
+ (list
+ (file-append nginx-accept-language-module "\
+/etc/nginx/modules/ngx_http_accept_language_module.so")))
+@end lisp
+
@item @code{extra-content} (default: @code{""})
Extra content for the @code{http} block. Should be string or a string
valued G-expression.
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 9320da5..f13e864 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2018 Pierre-Antoine Rouby <address@hidden>
;;; Copyright © 2017, 2018, 2019 Christopher Baines <address@hidden>
;;; Copyright © 2018 Marius Bakke <address@hidden>
+;;; Copyright © 2019 Florian Pelz <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -95,6 +96,7 @@
nginx-configuration-upstream-blocks
nginx-configuration-server-names-hash-bucket-size
nginx-configuration-server-names-hash-bucket-max-size
+ nginx-configuration-modules
nginx-configuration-extra-content
nginx-configuration-file
@@ -522,6 +524,7 @@
(default #f))
(server-names-hash-bucket-max-size
nginx-configuration-server-names-hash-bucket-max-size
(default #f))
+ (modules nginx-configuration-modules (default '()))
(extra-content nginx-configuration-extra-content
(default ""))
(file nginx-configuration-file ;#f | string | file-like
@@ -542,6 +545,9 @@ of index files."
((? string? str) (list str " ")))
names))
+(define (emit-load-module module)
+ (list "load_module " module ";\n"))
+
(define emit-nginx-location-config
(match-lambda
(($ <nginx-location-configuration> uri body)
@@ -615,12 +621,14 @@ of index files."
server-blocks upstream-blocks
server-names-hash-bucket-size
server-names-hash-bucket-max-size
+ modules
extra-content)
(apply mixed-text-file "nginx.conf"
(flatten
"user nginx nginx;\n"
"pid " run-directory "/pid;\n"
"error_log " log-directory "/error.log info;\n"
+ (map emit-load-module modules)
"http {\n"
" client_body_temp_path " run-directory "/client_body_temp;\n"
" proxy_temp_path " run-directory "/proxy_temp;\n"
- 96/182: gnu: r-sp: Update to 1.3-2., (continued)
- 96/182: gnu: r-sp: Update to 1.3-2., guix-commits, 2019/11/15
- 102/182: gnu: fcitx: Don't use NAME in source URI., guix-commits, 2019/11/15
- 100/182: gnu: r-plotly: Update to 4.9.1., guix-commits, 2019/11/15
- 99/182: gnu: r-nlme: Update to 3.1-142., guix-commits, 2019/11/15
- 104/182: gnu: fcitx-configtool: Don't use NAME in source URI., guix-commits, 2019/11/15
- 114/182: gnu: python-astroid: Update to 2.3.3., guix-commits, 2019/11/15
- 117/182: gnu: perl-data-compare: Update to 1.27., guix-commits, 2019/11/15
- 118/182: gnu: python-mpi4py: Update to 3.0.3., guix-commits, 2019/11/15
- 111/182: gnu: Add delft-icon-theme., guix-commits, 2019/11/15
- 116/182: gnu: perl-danga-socket: Update to 1.62., guix-commits, 2019/11/15
- 83/182: services: Make it possible to include dynamic modules in nginx.,
guix-commits <=
- 91/182: gnu: libssh: Update to 0.9.2., guix-commits, 2019/11/15
- 93/182: gnu: polybar: Update to 3.4.1., guix-commits, 2019/11/15
- 101/182: gnu: r-hmisc: Update to 4.3-0., guix-commits, 2019/11/15
- 109/182: guix: package: lock profiles when processing them., guix-commits, 2019/11/15
- 107/182: services: mpd: Connect to the user's PulseAudio socket., guix-commits, 2019/11/15
- 113/182: gnu: Add gnome-shell-extension-noannoyance., guix-commits, 2019/11/15
- 119/182: gnu: python-latexcodec: Update to 1.0.7., guix-commits, 2019/11/15
- 92/182: gnu: Fix deprecation of monolithic Qt 5.x package., guix-commits, 2019/11/15
- 108/182: guix: Add file-locking with no wait., guix-commits, 2019/11/15
- 112/182: gnu: Add gnome-shell-extension-dash-to-dock., guix-commits, 2019/11/15