Initial check-in.

Tooling and initial files.
This commit is contained in:
Érico Nogueira 2021-10-19 18:23:07 -03:00
commit f61d1e1112
7 changed files with 41 additions and 0 deletions

21
README.md Normal file
View File

@ -0,0 +1,21 @@
## Érico's gemini place
### How to use
Create certs in `certs/` using with `generate.sh`, which requires
[x509cert(1)](https://x509cert.mforney.org/x509cert.1.html).
Copy [lc19](https://sr.ht/~thededem/lc19/) executable to directory, install
[s6-networking](https://skarnet.org/software/s6-networking/), and run
`host.sh`.
#### void-docs
If you want to use `void-docs.erico.dev` domain, it's necessary to generate
certs with `N=2` and `CN=void-docs.erico.dev`. Files should be generated from a
[void-docs](https://github.com/void-linux/void-docs) repository and copied
here:
```sh
$ cp -r book/gemini/* /path/to/ericonr-gemini/gemini/void-docs.erico.dev/1965/
```

3
certs/generate.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
brssl skey -gen ec -rawpem key${N}.pem
x509cert -d 10y key${N}.pem "CN=${CN:-erico.dev}" > cert${N}.pem

View File

@ -0,0 +1 @@
index.gmi

View File

@ -0,0 +1,7 @@
# Érico's place
Hello!
Here is some of the content hosted here:
=> gemini://void-docs.erico.dev - Void Docs, on Gemini!

View File

@ -0,0 +1 @@
toc.gmi

5
host.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
exec env \
CERTFILE:void-docs.erico.dev=certs/cert2.pem KEYFILE:void-docs.erico.dev=certs/key2.pem \
KEYFILE=certs/key.pem CERTFILE=certs/cert.pem \
s6-tlsserver -k1 0.0.0.0 1965 ./lc19 --data-dir=gemini/

3
hostname.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
test -z "$1" && exit 1
exec mkdir -p "gemini/$1/1965/"