summary refs log tree commit diff
path: root/gnu/services
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm6
-rw-r--r--gnu/services/networking.scm11
-rw-r--r--gnu/services/web.scm57
3 files changed, 67 insertions, 7 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index b1eff89ecc..77215e411c 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 John Soo <jsoo1@asu.edu>
+;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -818,7 +819,10 @@ package or any valid argument to @command{setfont}, as in this example:
 '((\"tty1\" . \"LatGrkCyr-8x16\")
   (\"tty2\" . (file-append
                 font-tamzen
-                \"/share/kbd/consolefonts/TamzenForPowerline10x20.psf\")))
+                \"/share/kbd/consolefonts/TamzenForPowerline10x20.psf\"))
+  (\"tty3\" . (file-append
+                font-terminus
+                \"/share/consolefonts/ter-132n\"))) ; for HDPI
 @end example\n")))
 
 (define* (console-font-service tty #:optional (font "LatGrkCyr-8x16"))
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 6485c08ff7..59b895d60b 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -234,14 +234,15 @@ fe80::1%lo0 apps.facebook.com\n")
                  (define valid?
                    (lambda (interface)
                      (and (arp-network-interface? interface)
-                          (not (loopback-network-interface? interface)))))
+                          (not (loopback-network-interface? interface))
+                          ;; XXX: Make sure the interfaces are up so that
+                          ;; 'dhclient' can actually send/receive over them.
+                          ;; Ignore those that cannot be activated.
+                          (false-if-exception
+                           (set-network-interface-up interface)))))
                  (define ifaces
                    (filter valid? (all-network-interface-names)))
 
-                 ;; XXX: Make sure the interfaces are up so that 'dhclient' can
-                 ;; actually send/receive over them.
-                 (for-each set-network-interface-up ifaces)
-
                  (false-if-exception (delete-file #$pid-file))
                  (let ((pid (fork+exec-command
                              (cons* #$dhclient "-nw"
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)))