Initial commit.
[software/mumi.git] / mumi / config.scm.in
1 ;;; mumi -- Mediocre, uh, mail interface
2 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
3 ;;;
4 ;;; This program is free software: you can redistribute it and/or
5 ;;; modify it under the terms of the GNU Affero General Public License
6 ;;; as published by the Free Software Foundation, either version 3 of
7 ;;; the License, or (at your option) any later version.
8 ;;;
9 ;;; This program is distributed in the hope that it will be useful,
10 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 ;;; Affero General Public License for more details.
13 ;;;
14 ;;; You should have received a copy of the GNU Affero General Public
15 ;;; License along with this program. If not, see
16 ;;; <http://www.gnu.org/licenses/>.
17
18 (define-module (mumi config)
19 #:export (%config))
20
21 (define-public %mu-database-directory
22 (string-append (getenv "HOME") "/dev/mumi/muhome/"))
23
24 (define %config
25 ;; Try to find the "assets" directory relative to the executable
26 ;; first. This is useful when using "pre-inst-env".
27 `((assets-dir . ,(let ((maybe-dir
28 (string-append (getcwd) "/assets")))
29 (if (and (getenv "MUMI_UNINSTALLED")
30 (file-exists? maybe-dir))
31 maybe-dir
32 ;; TODO: use @assetsdir@ variable here
33 "@prefix@/share/mumi/assets")))
34 (host . "localhost")
35 (port . 1234)
36 (list . "guix-patches@gnu.org")))