Skip to content

Commit

Permalink
nixos/stalwart-mail: Fix creation of dataDir if not default
Browse files Browse the repository at this point in the history
Without these I got

`mkdir: cannot create directory ‘/data/stalwart’: Read-only file system`
  • Loading branch information
Artturin committed Dec 27, 2024
1 parent 2c0af53 commit 8cf119c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nixos/modules/services/mail/stalwart-mail.nix
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ in
};
};

systemd.tmpfiles.rules = [
"d '${cfg.dataDir}' - stalwart-mail stalwart-mail - -"
];

systemd = {
packages = [ cfg.package ];
services.stalwart-mail = {
Expand Down Expand Up @@ -147,6 +151,9 @@ in
StandardOutput = "journal";
StandardError = "journal";

ReadWritePaths = [
cfg.dataDir
];
CacheDirectory = "stalwart-mail";
StateDirectory = "stalwart-mail";

Expand Down

0 comments on commit 8cf119c

Please sign in to comment.