about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-03-29 15:25:51 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-03-29 15:25:51 +0100
commitddb5f85e2a518eda1645819646f59125bb33c336 (patch)
treedbd1ed554ae4196249b6590b6ebd0b4359fd7317
parentmodules/constants: Enforce the 0 to 400 limit (diff)
downloadnixos-server-ddb5f85e2a518eda1645819646f59125bb33c336.zip
modules/stalwart-mail: Assign uids and gids to the stalwart users
-rw-r--r--modules/by-name/co/constants/module.nix2
-rw-r--r--modules/by-name/st/stalwart-mail/module.nix12
2 files changed, 13 insertions, 1 deletions
diff --git a/modules/by-name/co/constants/module.nix b/modules/by-name/co/constants/module.nix
index 67d1601..c55a736 100644
--- a/modules/by-name/co/constants/module.nix
+++ b/modules/by-name/co/constants/module.nix
@@ -35,7 +35,9 @@
       redis-mastodon = 232;
       redis-peertube = 233;
       redis-rspamd = 234;
+      redis-stalwart-mail = 235;
       mastodon = 236;
+      stalwart-mail = 238;
       virtualMail = 240;
       acme = 328;
       dhcpcd = 329;
diff --git a/modules/by-name/st/stalwart-mail/module.nix b/modules/by-name/st/stalwart-mail/module.nix
index 6905005..1ad76c7 100644
--- a/modules/by-name/st/stalwart-mail/module.nix
+++ b/modules/by-name/st/stalwart-mail/module.nix
@@ -249,10 +249,20 @@ in {
     # service is restarted on a potentially large number of files.
     # That would cause unnecessary and unwanted delays.
     users = {
-      groups.stalwart-mail = {};
+      groups.stalwart-mail = {
+        gid = config.vhack.constants.ids.gids.stalwart-mail;
+      };
       users.stalwart-mail = {
         isSystemUser = true;
         group = "stalwart-mail";
+        uid = config.vhack.constants.ids.uids.stalwart-mail;
+      };
+      groups.redis-stalwart-mail = {
+        gid = config.vhack.constants.ids.gids.redis-stalwart-mail;
+      };
+      users.redis-stalwart-mail = {
+        group = "redis-stalwart-mail";
+        uid = config.vhack.constants.ids.uids.redis-stalwart-mail;
       };
     };