summary refs log tree commit diff stats
path: root/system/services/mail
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-24 16:09:20 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-24 16:09:20 +0100
commitb5fc07416652a445f15946ce7e5fc48766cf6722 (patch)
treede37587f0673e4aea12bc0532ee1b3879ab1e31c /system/services/mail
parentfix(modules/back): Set now needed source code URL environment variable (diff)
downloadnixos-server-b5fc07416652a445f15946ce7e5fc48766cf6722.tar.gz
nixos-server-b5fc07416652a445f15946ce7e5fc48766cf6722.zip
refactor(modules/impermanence): Migrate to by-name while distributing mods
Diffstat (limited to 'system/services/mail')
-rw-r--r--system/services/mail/default.nix4
-rw-r--r--system/services/mail/impermanence.nix46
2 files changed, 50 insertions, 0 deletions
diff --git a/system/services/mail/default.nix b/system/services/mail/default.nix
index 382a87f..c69e6bd 100644
--- a/system/services/mail/default.nix
+++ b/system/services/mail/default.nix
@@ -6,6 +6,10 @@
   ];
   users = import ./users.nix {};
 in {
+  imports = [
+    ./impermanence.nix
+  ];
+
   mailserver =
     lib.recursiveUpdate {
       enable = true;
diff --git a/system/services/mail/impermanence.nix b/system/services/mail/impermanence.nix
new file mode 100644
index 0000000..22a5318
--- /dev/null
+++ b/system/services/mail/impermanence.nix
@@ -0,0 +1,46 @@
+{...}: {
+  vhack.persist.directories = [
+    {
+      directory = "/var/lib/mail/backup";
+      user = "virtualMail";
+      group = "virtualMail";
+      mode = "0700";
+    }
+    {
+      directory = "/var/lib/mail/sieve";
+      user = "virtualMail";
+      group = "virtualMail";
+      mode = "0700";
+    }
+    {
+      directory = "/var/lib/mail/vmail";
+      user = "virtualMail";
+      group = "virtualMail";
+      mode = "0700";
+    }
+    {
+      directory = "/var/lib/mail/dkim";
+      user = "opendkim";
+      group = "opendkim";
+      mode = "0700";
+    }
+    {
+      directory = "/var/lib/postfix/data";
+      user = "postfix";
+      group = "postfix";
+      mode = "0700";
+    }
+    {
+      directory = "/var/lib/postfix/queue";
+      user = "postfix";
+      group = "postfix";
+      mode = "0700";
+    }
+    {
+      directory = "/var/lib/rspamd";
+      user = "rspamd";
+      group = "rspamd";
+      mode = "0700";
+    }
+  ];
+}