about summary refs log tree commit diff
path: root/users/sterni/mblog/packages.lisp
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2023-03-17T16·36+0100
committerclbot <clbot@tvl.fyi>2023-03-24T18·32+0000
commit80e168b22d602e2d2b8b872beadacc64460bd670 (patch)
treeb87796e4df8a06583feffca6a9a16ff735432be0 /users/sterni/mblog/packages.lisp
parentfee0c83915918f60c55c25a9c48c59b4e92eb598 (diff)
feat(sterni/mblog): implement environment based config mechanism r/6040
Change-Id: I091c0d5decc0a1eb3d24e81b713434ab391c677d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8347
Reviewed-by: sterni <sternenseemann@systemli.org>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/sterni/mblog/packages.lisp')
-rw-r--r--users/sterni/mblog/packages.lisp18
1 files changed, 15 insertions, 3 deletions
diff --git a/users/sterni/mblog/packages.lisp b/users/sterni/mblog/packages.lisp
index ffc9e3512a69..03c33f7efe12 100644
--- a/users/sterni/mblog/packages.lisp
+++ b/users/sterni/mblog/packages.lisp
@@ -1,5 +1,5 @@
 ;; SPDX-License-Identifier: GPL-3.0-only
-;; SPDX-FileCopyrightText: Copyright (C) 2022 by sterni
+;; SPDX-FileCopyrightText: Copyright (C) 2022-2023 by sterni
 
 (defpackage :maildir
   (:use :common-lisp)
@@ -8,12 +8,22 @@
   (:documentation
    "Very incomplete package for dealing with maildir(5)."))
 
+(defpackage :config
+  (:use
+   :common-lisp)
+  (:import-from :uiop :getenv)
+  (:import-from :alexandria :when-let)
+  (:export
+   :init-from-env
+   :*general-buffer-size*))
+
 (defpackage :note
   (:use
    :common-lisp
    :closure-html
    :cl-date-time-parser
-   :mime4cl)
+   :mime4cl
+   :config)
   (:import-from
    :alexandria
    :when-let*
@@ -36,7 +46,8 @@
    :klatre
    :who
    :maildir
-   :note)
+   :note
+   :config)
   (:export :build-mblog)
   (:import-from :local-time :universal-to-timestamp)
   (:shadowing-import-from :common-lisp :list))
@@ -46,6 +57,7 @@
    :common-lisp
    :uiop
    :note
+   :config
    :mblog)
   (:import-from :alexandria :starts-with)
   (:export :main))