aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/web.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-01-03 19:41:05 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-01-03 19:41:05 +0100
commit982eff9e841f3539e4ecf93669435a290bfde571 (patch)
treeb1e3f6fc85c6c35c264f091eb2fc5cff8514c230 /gnu/services/web.scm
parent7ba6d70e4528201151195e1ed2175ee4828bdb2f (diff)
parent7158fe4ded47a599ceb8d556132ba83fcc686962 (diff)
downloadpatches-982eff9e841f3539e4ecf93669435a290bfde571.tar
patches-982eff9e841f3539e4ecf93669435a290bfde571.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/services/web.scm')
-rw-r--r--gnu/services/web.scm57
1 files changed, 56 insertions, 1 deletions
diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index 372f4dc6fc..3ac7b7f52c 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -43,6 +43,7 @@
#:use-module (gnu packages gnupg)
#:use-module (gnu packages guile)
#:use-module (gnu packages logging)
+ #:use-module (gnu packages mail)
#:use-module (guix packages)
#:use-module (guix records)
#:use-module (guix modules)
@@ -256,7 +257,9 @@
patchwork-configuration-domain
patchwork-virtualhost
- patchwork-service-type))
+ patchwork-service-type
+
+ mumi-service-type))
;;; Commentary:
;;;
@@ -1652,3 +1655,55 @@ WSGIPassAuthorization On
patchwork-getmail-configs)))
(description
"Patchwork patch tracking system.")))
+
+
+;;;
+;;; Mumi.
+;;;
+
+(define %mumi-activation
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+
+ (mkdir-p "/var/mumi/mails")
+ (let* ((pw (getpwnam "mumi"))
+ (uid (passwd:uid pw))
+ (gid (passwd:gid pw)))
+ (chown "/var/mumi" uid gid)
+ (chown "/var/mumi/mails" uid gid)))))
+
+(define %mumi-accounts
+ (list (user-group (name "mumi") (system? #t))
+ (user-account
+ (name "mumi")
+ (group "mumi")
+ (system? #t)
+ (comment "Mumi web server")
+ (home-directory "/var/empty")
+ (shell (file-append shadow "/sbin/nologin")))))
+
+(define (mumi-shepherd-services mumi)
+ (list (shepherd-service
+ (provision '(mumi))
+ (documentation "Mumi bug-tracking web interface.")
+ (requirement '(networking))
+ (start #~(make-forkexec-constructor
+ '(#$(file-append mumi "/bin/mumi"))
+ #:user "mumi" #:group "mumi"
+ #:log-file "/var/log/mumi.log"))
+ (stop #~(make-kill-destructor)))))
+
+(define mumi-service-type
+ (service-type
+ (name 'mumi)
+ (extensions
+ (list (service-extension activation-service-type
+ (const %mumi-activation))
+ (service-extension account-service-type
+ (const %mumi-accounts))
+ (service-extension shepherd-root-service-type
+ mumi-shepherd-services)))
+ (description
+ "Run Mumi, a Web interface to the Debbugs bug-tracking server.")
+ (default-value mumi)))