aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile21
-rw-r--r--src/doc/favicon.svg62
-rw-r--r--src/doc/head.html2
-rwxr-xr-xsrc/doc/md2html.sh73
-rw-r--r--src/infrastructure/guix/system.scm23
6 files changed, 176 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index f1652b1..4a4015c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/public/
/*.log
/vendor/
+/.sentinel/
diff --git a/Makefile b/Makefile
index 51e4704..38ec1a5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,14 @@
.POSIX:
-all:
+all: public
check:
clean:
- rm -rf public/
+ rm -rf \
+ .sentinel/ public/
dev-check: check
@@ -19,3 +20,19 @@ deploy:
src/infrastructure/guix/system.scm \
toph:/etc/guix/
ssh toph reconfigure
+
+
+.sentinel/mkdir-public:
+ mkdir -p public .sentinel
+ touch $@
+
+public/favicon.svg: .sentinel/mkdir-public src/doc/favicon.svg
+ cp src/doc/favicon.svg $@
+
+public/style.css: .sentinel/mkdir-public
+ td -S > $@
+
+public/TODOs.html: .sentinel/mkdir-public TODOs.md
+ td -H | sh src/doc/md2html.sh -T TODOs > $@
+
+public: public/favicon.svg public/style.css public/TODOs.html
diff --git a/src/doc/favicon.svg b/src/doc/favicon.svg
new file mode 100644
index 0000000..ce566b2
--- /dev/null
+++ b/src/doc/favicon.svg
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
+ <path d="M 0 8 L 1 8 L 1 9 L 0 9 L 0 8 Z" />
+ <path d="M 0 13 L 1 13 L 1 14 L 0 14 L 0 13 Z" />
+ <path d="M 1 8 L 2 8 L 2 9 L 1 9 L 1 8 Z" />
+ <path d="M 1 13 L 2 13 L 2 14 L 1 14 L 1 13 Z" />
+ <path d="M 2 8 L 3 8 L 3 9 L 2 9 L 2 8 Z" />
+ <path d="M 2 13 L 3 13 L 3 14 L 2 14 L 2 13 Z" />
+ <path d="M 3 8 L 4 8 L 4 9 L 3 9 L 3 8 Z" />
+ <path d="M 3 13 L 4 13 L 4 14 L 3 14 L 3 13 Z" />
+ <path d="M 4 7 L 5 7 L 5 8 L 4 8 L 4 7 Z" />
+ <path d="M 4 8 L 5 8 L 5 9 L 4 9 L 4 8 Z" />
+ <path d="M 4 13 L 5 13 L 5 14 L 4 14 L 4 13 Z" />
+ <path d="M 5 6 L 6 6 L 6 7 L 5 7 L 5 6 Z" />
+ <path d="M 5 7 L 6 7 L 6 8 L 5 8 L 5 7 Z" />
+ <path d="M 5 13 L 6 13 L 6 14 L 5 14 L 5 13 Z" />
+ <path d="M 6 5 L 7 5 L 7 6 L 6 6 L 6 5 Z" />
+ <path d="M 6 6 L 7 6 L 7 7 L 6 7 L 6 6 Z" />
+ <path d="M 6 14 L 7 14 L 7 15 L 6 15 L 6 14 Z" />
+ <path d="M 7 1 L 8 1 L 8 2 L 7 2 L 7 1 Z" />
+ <path d="M 7 14 L 8 14 L 8 15 L 7 15 L 7 14 Z" />
+ <path d="M 7 15 L 8 15 L 8 16 L 7 16 L 7 15 Z" />
+ <path d="M 7 2 L 8 2 L 8 3 L 7 3 L 7 2 Z" />
+ <path d="M 7 3 L 8 3 L 8 4 L 7 4 L 7 3 Z" />
+ <path d="M 7 4 L 8 4 L 8 5 L 7 5 L 7 4 Z" />
+ <path d="M 7 5 L 8 5 L 8 6 L 7 6 L 7 5 Z" />
+ <path d="M 8 1 L 9 1 L 9 2 L 8 2 L 8 1 Z" />
+ <path d="M 8 15 L 9 15 L 9 16 L 8 16 L 8 15 Z" />
+ <path d="M 9 1 L 10 1 L 10 2 L 9 2 L 9 1 Z" />
+ <path d="M 9 2 L 10 2 L 10 3 L 9 3 L 9 2 Z" />
+ <path d="M 9 6 L 10 6 L 10 7 L 9 7 L 9 6 Z" />
+ <path d="M 9 15 L 10 15 L 10 16 L 9 16 L 9 15 Z" />
+ <path d="M 10 2 L 11 2 L 11 3 L 10 3 L 10 2 Z" />
+ <path d="M 10 3 L 11 3 L 11 4 L 10 4 L 10 3 Z" />
+ <path d="M 10 4 L 11 4 L 11 5 L 10 5 L 10 4 Z" />
+ <path d="M 10 5 L 11 5 L 11 6 L 10 6 L 10 5 Z" />
+ <path d="M 10 6 L 11 6 L 11 7 L 10 7 L 10 6 Z" />
+ <path d="M 11 6 L 12 6 L 12 7 L 11 7 L 11 6 Z" />
+ <path d="M 11 8 L 12 8 L 12 9 L 11 9 L 11 8 Z" />
+ <path d="M 10 15 L 11 15 L 11 16 L 10 16 L 10 15 Z" />
+ <path d="M 11 10 L 12 10 L 12 11 L 11 11 L 11 10 Z" />
+ <path d="M 11 12 L 12 12 L 12 13 L 11 13 L 11 12 Z" />
+ <path d="M 11 14 L 12 14 L 12 15 L 11 15 L 11 14 Z" />
+ <path d="M 11 15 L 12 15 L 12 16 L 11 16 L 11 15 Z" />
+ <path d="M 12 6 L 13 6 L 13 7 L 12 7 L 12 6 Z" />
+ <path d="M 12 8 L 13 8 L 13 9 L 12 9 L 12 8 Z" />
+ <path d="M 12 10 L 13 10 L 13 11 L 12 11 L 12 10 Z" />
+ <path d="M 12 12 L 13 12 L 13 13 L 12 13 L 12 12 Z" />
+ <path d="M 12 14 L 13 14 L 13 15 L 12 15 L 12 14 Z" />
+ <path d="M 13 6 L 14 6 L 14 7 L 13 7 L 13 6 Z" />
+ <path d="M 13 8 L 14 8 L 14 9 L 13 9 L 13 8 Z" />
+ <path d="M 13 10 L 14 10 L 14 11 L 13 11 L 13 10 Z" />
+ <path d="M 13 12 L 14 12 L 14 13 L 13 13 L 13 12 Z" />
+ <path d="M 13 13 L 14 13 L 14 14 L 13 14 L 13 13 Z" />
+ <path d="M 13 14 L 14 14 L 14 15 L 13 15 L 13 14 Z" />
+ <path d="M 14 7 L 15 7 L 15 8 L 14 8 L 14 7 Z" />
+ <path d="M 14 8 L 15 8 L 15 9 L 14 9 L 14 8 Z" />
+ <path d="M 14 9 L 15 9 L 15 10 L 14 10 L 14 9 Z" />
+ <path d="M 14 10 L 15 10 L 15 11 L 14 11 L 14 10 Z" />
+ <path d="M 14 11 L 15 11 L 15 12 L 14 12 L 14 11 Z" />
+ <path d="M 14 12 L 15 12 L 15 13 L 14 13 L 14 12 Z" />
+</svg>
diff --git a/src/doc/head.html b/src/doc/head.html
new file mode 100644
index 0000000..3902690
--- /dev/null
+++ b/src/doc/head.html
@@ -0,0 +1,2 @@
+<link rel="icon" href="favicon.svg" type="image/svg+xml" />
+<link rel="stylesheet" href="style.css" type="text/css" />
diff --git a/src/doc/md2html.sh b/src/doc/md2html.sh
new file mode 100755
index 0000000..12865da
--- /dev/null
+++ b/src/doc/md2html.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+set -eu
+
+
+usage() {
+ cat <<-'EOF'
+ Usage:
+ md2html.sh -T TITLE [-D TOC_DEPTH] < FILE.md
+ md2html.sh -h
+ EOF
+}
+
+help() {
+ cat <<-'EOF'
+
+ Options:
+ -T TITLE the required title of the generated HTML
+ document
+ -D TOC_DEPTH the depth of the generated table of
+ contents (default: 2)
+ -h, --help show this message
+
+
+ Read markdown text from STDIN and emit HTML to STDOUT.
+ EOF
+}
+
+for flag in "$@"; do
+ case "$flag" in
+ --)
+ break
+ ;;
+ --help)
+ usage
+ help
+ exit
+ ;;
+ *)
+ ;;
+ esac
+done
+
+TOC_DEPTH=2
+while getopts 'T:D:h' flag; do
+ case "$flag" in
+ T)
+ TITLE="$OPTARG"
+ ;;
+ D)
+ TOC_DEPTH="$OPTARG"
+ ;;
+ h)
+ usage
+ help
+ exit
+ ;;
+ *)
+ usage >&2
+ exit 2
+ ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+eval "$(assert-arg "${TITLE:-}" '-T TITLE')"
+
+pandoc \
+ -s \
+ --toc \
+ --toc-depth="$TOC_DEPTH" \
+ --metadata lang=en \
+ --metadata title="$TITLE" \
+ -H src/doc/head.html
diff --git a/src/infrastructure/guix/system.scm b/src/infrastructure/guix/system.scm
index 83edc1a..6218583 100644
--- a/src/infrastructure/guix/system.scm
+++ b/src/infrastructure/guix/system.scm
@@ -1060,8 +1060,14 @@
smtp_tls_cert_file = $smtpd_tls_cert_file
smtp_tls_key_file = $smtpd_tls_key_file
- smtpd_tls_security_level = may
smtp_tls_security_level = may
+
+ recipient_delimiter = +
+
+ # smtpd_sasl_security_options = FIXME: deny all
+ smtpd_sasl_tls_security_options = noanonymous
+ # FIXME: shouldn't this be "encrypt"?
+ smtpd_tls_security_level = may
smtpd_tls_auth_only = yes
smtpd_relay_restrictions = $smtpd_recipient_restrictions
@@ -1314,6 +1320,9 @@
mail_location = maildir:~~/Mail:INBOX=~~/Mail/Inbox:LAYOUT=fs
+ # FIXME:
+ # mail_plugins
+
namespace inbox {
inbox = yes
@@ -1824,7 +1833,14 @@
fastcgi_param HTTP_HOST $server_name;
fastcgi_pass 127.0.0.1:9000;
rewrite /git(.*) $1 break;
- "#))))))))))
+ "#)))
+ (nginx-location-configuration
+ (uri "/r/velhinho/")
+ (body
+ '(#"-
+ rewrite /r/velhinho(.*) $1 break;
+ proxy_pass http://velhinho:4219;
+ "#))))))))))
(simple-service 'create-/srv/www activation-service-type
#~(begin
(use-modules (guix build utils))
@@ -1898,11 +1914,10 @@
(format #f
#"-
canonical_maps = inline:{ ~a=~a }
- alias_database = inline:{ @~a=~a }
+ alias_database = static:~a
"#
whoami
public-me
- tld
public-me))))
(service mail-aliases-service-type
`(("root" ,whoami)