summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorJack Hill <jackhill@jackhill.us>2020-03-05 15:39:48 -0500
committerLudovic Courtès <ludo@gnu.org>2020-03-08 21:21:57 +0100
commitf6713b55a18e2e1310af772e7556ce803f52e527 (patch)
tree8ce5f17e84c6c6a5958446ec93c8b0e941b40207 /gnu/services
parent9ef37e81d6acae0de978abfdf0f5f19a0760bd71 (diff)
downloadpatches-f6713b55a18e2e1310af772e7556ce803f52e527.tar
patches-f6713b55a18e2e1310af772e7556ce803f52e527.tar.gz
services: certbot: Add server option.
* gnu/services/certbot.scm (certbot-configuration): Add server option. (certbot-command): Use server option. (certbot-actication): Use server option. (certbot-nginx-server-configurations): Use server option. * doc/guix.texi (Certificate Services): Document server option. Co-authored-by: Tobias Geerinckx-Rice <me@tobias.gr> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/certbot.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/gnu/services/certbot.scm b/gnu/services/certbot.scm
index 0d3be03383..3e005918d6 100644
--- a/gnu/services/certbot.scm
+++ b/gnu/services/certbot.scm
@@ -3,6 +3,8 @@
;;; Copyright © 2016 Sou Bunnbu <iyzsong@member.fsf.org>
;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2020 Jack Hill <jackhill@jackhill.us>
+;;; Copyright © 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -70,6 +72,8 @@
(certificates certbot-configuration-certificates
(default '()))
(email certbot-configuration-email)
+ (server certbot-configuration-server
+ (default #f))
(rsa-key-size certbot-configuration-rsa-key-size
(default #f))
(default-location certbot-configuration-default-location
@@ -82,7 +86,7 @@
(define certbot-command
(match-lambda
(($ <certbot-configuration> package webroot certificates email
- rsa-key-size default-location)
+ server rsa-key-size default-location)
(let* ((certbot (file-append package "/bin/certbot"))
(rsa-key-size (and rsa-key-size (number->string rsa-key-size)))
(commands
@@ -101,6 +105,7 @@
"--cert-name" name
"--manual-public-ip-logging-ok"
"-d" (string-join domains ","))
+ (if server `("--server" ,server) '())
(if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())
(if authentication-hook
`("--manual-auth-hook" ,authentication-hook)
@@ -113,6 +118,7 @@
"--webroot" "-w" webroot
"--cert-name" name
"-d" (string-join domains ","))
+ (if server `("--server" ,server) '())
(if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())
(if deploy-hook `("--deploy-hook" ,deploy-hook) '()))))))
certificates)))
@@ -142,7 +148,7 @@
(message (format #f (G_ "~a may need to be run~%") script)))
(match config
(($ <certbot-configuration> package webroot certificates email
- rsa-key-size default-location)
+ server rsa-key-size default-location)
(with-imported-modules '((guix build utils))
#~(begin
(use-modules (guix build utils))
@@ -154,7 +160,7 @@
(define certbot-nginx-server-configurations
(match-lambda
(($ <certbot-configuration> package webroot certificates email
- rsa-key-size default-location)
+ server rsa-key-size default-location)
(list
(nginx-server-configuration
(listen '("80" "[::]:80"))