Ensure directories

This commit is contained in:
niten 2024-01-24 19:40:27 -08:00
parent 73454ddb84
commit 5f48ba112e
1 changed files with 6 additions and 3 deletions

View File

@ -54,6 +54,11 @@ in {
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = [
"d ${state/directory}/postgres 0700 root root - -"
"d ${state/directory}/pictrs 0700 root root - -"
];
containers.lemmy = {
autoStart = true;
privateNetwork = true;
@ -67,9 +72,7 @@ in {
"/var/lib/postgres/data" = {
hostPath = "${cfg.state-directory}/postgres";
};
"/var/lib/private" = {
hostPath = "${cfg.state-directory}/lemmy-data";
};
"/var/lib/private" = { hostPath = "${cfg.state-directory}/pictrs"; };
"${cfg.admin-password-file}" = {
isReadOnly = true;
hostPath = cfg.admin-password-file;