1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
[Unit]
Description=webchat minimal E2EE Matrix chat webapp
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
# webchat has NO authentication of its own: whoever can reach this address can
# read and send messages as you, in *every* room the account is in — serve lists
# them all. Bind to loopback (or a tailscale address) only, never 0.0.0.0.
#
# The Matrix session (access token, olm identity, cross-signing keys) lives in
# the state dir and is bootstrapped once with:
# webchat login --user '@you:augsburg.one'
#
# This runs the binary from the nix profile, so what is deployed is always a
# build of committed sources:
# nix profile upgrade webchat && systemctl --user restart webchat
#
# To iterate without a `nix profile upgrade` round-trip, point ExecStart at the
# locally-built binary instead (go build -tags "fts5 goolm" -o ./webchat .) —
# but remember that it then runs whatever is in the working tree, committed or
# not.
ExecStart=%h/.nix-profile/bin/webchat serve \
--addr=127.0.0.1:8775 \
--db=%h/.local/share/webchat/webchat.db
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
|