Ensure directories
This commit is contained in:
parent
73454ddb84
commit
5f48ba112e
|
@ -54,6 +54,11 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${state/directory}/postgres 0700 root root - -"
|
||||||
|
"d ${state/directory}/pictrs 0700 root root - -"
|
||||||
|
];
|
||||||
|
|
||||||
containers.lemmy = {
|
containers.lemmy = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
privateNetwork = true;
|
privateNetwork = true;
|
||||||
|
@ -67,9 +72,7 @@ in {
|
||||||
"/var/lib/postgres/data" = {
|
"/var/lib/postgres/data" = {
|
||||||
hostPath = "${cfg.state-directory}/postgres";
|
hostPath = "${cfg.state-directory}/postgres";
|
||||||
};
|
};
|
||||||
"/var/lib/private" = {
|
"/var/lib/private" = { hostPath = "${cfg.state-directory}/pictrs"; };
|
||||||
hostPath = "${cfg.state-directory}/lemmy-data";
|
|
||||||
};
|
|
||||||
"${cfg.admin-password-file}" = {
|
"${cfg.admin-password-file}" = {
|
||||||
isReadOnly = true;
|
isReadOnly = true;
|
||||||
hostPath = cfg.admin-password-file;
|
hostPath = cfg.admin-password-file;
|
||||||
|
|
Loading…
Reference in New Issue