Add etherpad, update codex

This commit is contained in:
Hunter Haugen 2026-03-03 21:50:04 -08:00
parent 176d2a7723
commit aa2b38d3bf
Signed by: hunner
GPG key ID: EF99694AA599DDAD
8 changed files with 206 additions and 14 deletions

View file

@ -1,6 +1,11 @@
{ pkgs, ... }:
{ config, pkgs, ... }:
{
sops.secrets.etherpad-env = {
owner = "etherpad";
mode = "0400";
};
users.users.etherpad = {
isSystemUser = true;
group = "etherpad";
@ -15,6 +20,12 @@
dbSettings = {
filename = "/var/lib/etherpad-lite/rusty.db";
};
users = {
hunner = {
password = "\${ETHERPAD_ADMIN_PASSWORD}";
is_admin = true;
};
};
};
# Etherpad on etherpad.hunner.dev (Cloudflare proxy -> nginx -> localhost:9001).
@ -27,9 +38,10 @@
Type = "simple";
User = "etherpad";
Group = "etherpad";
EnvironmentFile = [ config.sops.secrets.etherpad-env.path ];
StateDirectory = "etherpad-lite";
WorkingDirectory = "/var/lib/etherpad-lite";
ExecStart = "${pkgs.etherpad-lite}/bin/etherpad-lite --settings /etc/etherpad-lite/settings.json --sessionkey /var/lib/etherpad-lite/SESSIONKEY.txt --apikey /var/lib/etherpad-lite/APIKEY.txt";
ExecStart = "${pkgs.unstable.etherpad-lite}/bin/etherpad-lite --settings /etc/etherpad-lite/settings.json --sessionkey /var/lib/etherpad-lite/SESSIONKEY.txt --apikey /var/lib/etherpad-lite/APIKEY.txt";
Restart = "on-failure";
RestartSec = "5s";
};