Make the directory

This commit is contained in:
niten 2024-01-25 22:49:28 -08:00
parent 138d695fcd
commit 12a2fe6ef8
1 changed files with 1 additions and 0 deletions

View File

@ -93,6 +93,7 @@ in {
path = with pkgs; [ pwgen config.services.postgresql.package ];
script = ''
PASSWD=$(pwgen 25)
mkdir -p /run/lemmy
echo "postgresql://lemmy:$PASSWD@lemmy&host=/var/run/postgresql" > /run/lemmy/postgresql.passwd
sudo -u postgres psql -c "ALTER USER lemmy ENCRYPTED PASSWORD '$PASSWD';"
'';